lnmp1.6安装mysql8.0.15失败
服务器配置:16G内存2T硬盘
CentOS Linux release 7.5.1804 (Core) 4.9.168-xxxx-std-ipv6-64
安装环境:
nginx-1.14.2
mysql-8.0.15
php-7.3.4
安装mysql失败:
[ 63%] Building CXX object sql/CMakeFiles/sql_main.dir/json_dom.cc.o
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc: In function ‘Json_dom_ptr merge_doms(Json_dom_ptr, Json_dom_ptr)’:
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc:112:12: error: cannot bind ‘Json_object_ptr {aka std::unique_ptr<Json_object>}’ lvalue to ‘std::unique_ptr<Json_object>&&’
return left_object;
^
In file included from /usr/include/c++/4.8.2/memory:81:0,
from /root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.h:29,
from /root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc:23:
/usr/include/c++/4.8.2/bits/unique_ptr.h:169:2: error: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) ’
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc:125:10: error: cannot bind ‘Json_array_ptr {aka std::unique_ptr<Json_array>}’ lvalue to ‘std::unique_ptr<Json_array>&&’
return left_array;
^
In file included from /usr/include/c++/4.8.2/memory:81:0,
from /root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.h:29,
from /root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc:23:
/usr/include/c++/4.8.2/bits/unique_ptr.h:169:2: error: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) ’
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc: In member function ‘virtual Json_dom_ptr Json_object::clone() const’:
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc:1010:10: error: cannot bind ‘Json_object_ptr {aka std::unique_ptr<Json_object>}’ lvalue to ‘std::unique_ptr<Json_object>&&’
return o;
^
In file included from /usr/include/c++/4.8.2/memory:81:0,
from /root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.h:29,
from /root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc:23:
/usr/include/c++/4.8.2/bits/unique_ptr.h:169:2: error: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) ’
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc: In member function ‘virtual Json_dom_ptr Json_array::clone() const’:
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc:1150:10: error: cannot bind ‘Json_array_ptr {aka std::unique_ptr<Json_array>}’ lvalue to ‘std::unique_ptr<Json_array>&&’
return vv;
^
In file included from /usr/include/c++/4.8.2/memory:81:0,
from /root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.h:29,
from /root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc:23:
/usr/include/c++/4.8.2/bits/unique_ptr.h:169:2: error: initializing argument 1 of ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) ’
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc: In function ‘Json_dom_ptr merge_doms(Json_dom_ptr, Json_dom_ptr)’:
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc:127:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc: In member function ‘virtual Json_dom_ptr Json_object::clone() const’:
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc:1012:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc: In member function ‘virtual Json_dom_ptr Json_array::clone() const’:
/root/lnmp1.6/src/mysql-8.0.15/sql/json_dom.cc:1152:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** Error 1
make: *** Error 2
make: *** Error 2
include/mysql.sh: line 711: /usr/local/mysql/bin/mysqld: No such file or directory
mysql.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig mysql on
/etc/init.d/mysql: line 239: my_print_defaults: command not found
Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)
/etc/init.d/mysql: line 239: my_print_defaults: command not found
/etc/init.d/mysql: line 239: my_print_defaults: command not found
ERROR! MySQL server PID file could not be found!
/etc/init.d/mysql: line 239: my_print_defaults: command not found
Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)
include/mysql.sh: line 50: /usr/local/mysql/bin/mysqladmin: No such file or directory
failed, try other way...
/etc/init.d/mysql: line 239: my_print_defaults: command not found
/etc/init.d/mysql: line 239: my_print_defaults: command not found
ERROR! MySQL server PID file could not be found!
/etc/init.d/mysql: line 239: my_print_defaults: command not found
Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)
include/mysql.sh: line 63: /usr/local/mysql/bin/mysql: No such file or directory
Set password failed!
/etc/init.d/mysql: line 239: my_print_defaults: command not found
/etc/init.d/mysql: line 239: my_print_defaults: command not found
ERROR! MySQL server PID file could not be found!
/etc/init.d/mysql: line 239: my_print_defaults: command not found
Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)
include/main.sh: line 681: /usr/local/mysql/bin/mysql: No such file or directory
Update root password...
include/main.sh: line 681: /usr/local/mysql/bin/mysql: No such file or directory
... Failed!
Remove anonymous users...
include/main.sh: line 681: /usr/local/mysql/bin/mysql: No such file or directory
include/main.sh: line 681: /usr/local/mysql/bin/mysql: No such file or directory
... Failed!
Disallow root login remotely...
include/main.sh: line 681: /usr/local/mysql/bin/mysql: No such file or directory
... Failed!
Remove test database...
include/main.sh: line 681: /usr/local/mysql/bin/mysql: No such file or directory
... Failed!
Reload privilege tables...
include/main.sh: line 681: /usr/local/mysql/bin/mysql: No such file or directory
... Failed!
/etc/init.d/mysql: line 239: my_print_defaults: command not found
/etc/init.d/mysql: line 239: my_print_defaults: command not found
ERROR! MySQL server PID file could not be found!
/etc/init.d/mysql: line 239: my_print_defaults: command not found
Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)
/etc/init.d/mysql: line 239: my_print_defaults: command not found
ERROR! MySQL server PID file could not be found!
Clean database src directory...
gcc -dumpversion 运行看一下
感觉有可能是gcc版本低造成的,可以尝试修改 include/version.sh 中 mysql-8.0.15 改成 mysql-8.0.13 试试看 gcc 4.8.5
改成8.0.13 成功安装了
页:
[1]