[已解决]lnmp1.4版树莓派3 arm64 debian9 mysql编译失败
我使用的是pi64的镜像(镜像地址:https://github.com/bamarni/pi64/releases/download/2017-07-31/pi64-desktop.zip),树莓派3的64位系统cpu平台是arm64的使用lnmp1.4完整包安装的以下是部分节选日志,附件将上传完整日志,麻烦军哥帮看看是什么问题
[ 68%] Building C object libmysql/CMakeFiles/clientlib.dir/get_password.c.o
[ 68%] Building C object libmysql/CMakeFiles/clientlib.dir/libmysql.c.o
[ 68%] Building C object libmysql/CMakeFiles/clientlib.dir/errmsg.c.o
[ 68%] Building C object libmysql/CMakeFiles/clientlib.dir/__/sql-common/client.c.o
[ 68%] Building C object libmysql/CMakeFiles/clientlib.dir/__/sql-common/my_time.c.o
[ 68%] Building C object libmysql/CMakeFiles/clientlib.dir/__/sql-common/client_plugin.c.o
/root/lnmp1.4-full/src/mysql-5.5.56/sql-common/client_plugin.c: In function ‘mysql_client_plugin_init’:
/root/lnmp1.4-full/src/mysql-5.5.56/sql-common/client_plugin.c:252:40: error: incompatible type for argument 5 of ‘add_plugin’
add_plugin(&mysql, *builtin, 0, 0, 0);
^
/root/lnmp1.4-full/src/mysql-5.5.56/sql-common/client_plugin.c:120:1: note: expected ‘va_list {aka __va_list}’ but argument is of type ‘int’
add_plugin(MYSQL *mysql, struct st_mysql_client_plugin *plugin, void *dlhandle,
^~~~~~~~~~
/root/lnmp1.4-full/src/mysql-5.5.56/sql-common/client_plugin.c: In function ‘mysql_client_register_plugin’:
/root/lnmp1.4-full/src/mysql-5.5.56/sql-common/client_plugin.c:310:45: error: incompatible type for argument 5 of ‘add_plugin’
plugin= add_plugin(mysql, plugin, 0, 0, 0);
^
/root/lnmp1.4-full/src/mysql-5.5.56/sql-common/client_plugin.c:120:1: note: expected ‘va_list {aka __va_list}’ but argument is of type ‘int’
add_plugin(MYSQL *mysql, struct st_mysql_client_plugin *plugin, void *dlhandle,
^~~~~~~~~~
libmysql/CMakeFiles/clientlib.dir/build.make:182: recipe for target 'libmysql/CMakeFiles/clientlib.dir/__/sql-common/client_plugin.c.o' failed
make: *** Error 1
CMakeFiles/Makefile2:2745: recipe for target 'libmysql/CMakeFiles/clientlib.dir/all' failed
make: *** Error 2
Makefile:160: recipe for target 'all' failed
make: *** Error 2
include/mysql.sh: line 359: /usr/local/mysql/scripts/mysql_install_db: No such file or directory
Add mysql service at system startup...
Starting mysql (via systemctl): mysql.service.
include/mysql.sh: line 33: /usr/local/mysql/bin/mysqladmin: No such file or directory
failed, try other way...
include/mysql.sh: line 45: /usr/local/mysql/bin/mysql: No such file or directory
Set password failed!
include/mysql.sh: line 47: /usr/local/mysql/bin/mysql: No such file or directory
FLUSH PRIVILEGES failed!
Restarting mysql (via systemctl): mysql.service.
include/main.sh: line 599: /usr/local/mysql/bin/mysql: No such file or directory
Update root password...
include/main.sh: line 599: /usr/local/mysql/bin/mysql: No such file or directory
... Failed!
Remove anonymous users...
include/main.sh: line 599: /usr/local/mysql/bin/mysql: No such file or directory
include/main.sh: line 599: /usr/local/mysql/bin/mysql: No such file or directory
... Failed!
Disallow root login remotely...
include/main.sh: line 599: /usr/local/mysql/bin/mysql: No such file or directory
... Failed!
Remove test database...
include/main.sh: line 599: /usr/local/mysql/bin/mysql: No such file or directory
... Failed!
Reload privilege tables...
include/main.sh: line 599: /usr/local/mysql/bin/mysql: No such file or directory
... Failed!
Restarting mysql (via systemctl): mysql.service.
Stopping mysql (via systemctl): mysql.service.
[+] Installing php-7.1.7
Uncompress php-7.1.7.tar.bz2...
cd php-7.1.7...
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
checking for cc... cc
[ 本帖最后由 cjl3230 于 2017-8-10 12:30 编辑 ] 不清楚原因
回复 2# 的帖子
http://blog.csdn.net/dlutxie/article/details/8654677 看了一下这个帖子,里面好像有提到mysql 5.5在arm上编译的add_plugin的问题 感觉好像是代码本身存在问题回复 2# 的帖子
军哥 找到问题了arm64位uname -m 显示
raspberrypi:~# uname -m
aarch64
raspberrypi:~#
而main.sh下面 只判断了uname -m 为arm的情况
Get_ARM()
{
if uname -m | grep -Eqi "arm"; then
Is_ARM='y'
fi
}
看了下include/mysql.sh只有判断ARM平台 才使用了那个mysql补丁
MySQL_ARM_Patch()
{
Get_ARM
if [ "${Is_ARM}" = "y" ]; then
patch -p1 < ${cur_dir}/src/patch/mysql-5.5-fix-arm-client_plugin.patch
fi
}
需要把aarch64也加入到arm的判断中
回复 4# 的帖子
查了一下好像是raspberry pi3开始才是aarch64的,你那边测试安装可以了不回复 5# 的帖子
mysql可以了php又有问题了我是把你Get_ARM里面改成下面这样 临时解决的
Get_ARM()
{
if uname -m | grep -Eqi "aarch64"; then
Is_ARM='y'
fi
} php错误日志
checking for cURL support... yes
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
make: *** No targets specified and no makefile found.Stop.
make: *** No rule to make target 'install'.Stop.
Copy new php configure file...
Modify php.ini......
include/php.sh: line 23: pear: command not found
include/php.sh: line 24: pecl: command not found
include/php.sh: line 29: php: command not found
curl: (23) Failed writing body (0 != 16133)
Install ZendGuardLoader for PHP 7.1...
unavailable now.
Write ZendGuardLoader to php.ini...
Creating new php-fpm configure file...
Copy php-fpm init.d file...
cp: cannot stat '/root/lnmp1.4-full/src/php-7.1.7/sapi/fpm/init.d.php-fpm': No such file or directory
chmod: cannot access '/etc/init.d/php-fpm': No such file or directory
附:lnmp-install.log日志
[ 本帖最后由 cjl3230 于 2017-8-10 13:57 编辑 ]
回复 5# 的帖子
include/php.sh PHP_with_curl函数PHP_with_curl()
{
Get_ARM
if [[ "${DISTRO}" = "CentOS" && "${Is_ARM}" = "y" ]];then
Install_Curl
with_curl='--with-curl=/usr/local/curl'
else
with_curl='--with-curl'
fi
}
是CentOS版本的arm架构 才会执行Install_Curl吗?
回复 7# 的帖子
最简单的方式是改 include/php.sh 将 if [[ "${DISTRO}" = "CentOS" && "${Is_ARM}" = "y" ]];then 改成 if [[ "${DISTRO}" = "CentOS" || "${Is_ARM}" = "y" ]];then改完保存重新安装就可以了
另外的方法
你可以下是不是有 /usr/include/aarch64-linux-gnu/curl 目录,有的话ln -s 软链接到 /usr/include/ 目录下
回复 9# 的帖子
有这个目录/usr/include/aarch64-linux-gnu/curl 正在重新安装lnmp谢谢军哥 我先试下 军哥(上次只是php安装失败,这次就直接只安装php了)php安装失败提示mcrypt不对我在日志里面发现好多 unable to guess system type
以下是php安装失败的日志
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for working memcmp... yes
checking for stdarg.h... (cached) yes
checking for mcrypt support... yes
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
make: *** No targets specified and no makefile found.Stop.
make: *** No rule to make target 'install'.Stop.
Copy new php configure file...
Modify php.ini......
include/php.sh: line 23: pear: command not found
include/php.sh: line 24: pecl: command not found
include/php.sh: line 29: php: command not found
curl: (23) Failed writing body (0 != 16133)
Install ZendGuardLoader for PHP 7.1...
unavailable now.
Write ZendGuardLoader to php.ini...
Creating new php-fpm configure file...
Copy php-fpm init.d file...
cp: cannot stat '/root/lnmp1.4-full/src/php-7.1.7/sapi/fpm/init.d.php-fpm': No such file or directory
[ 本帖最后由 cjl3230 于 2017-8-11 09:18 编辑 ]
回复 11# 的帖子
configure: error: cannot guess build type; you must specify onemake: *** No targets specified and no makefile found.Stop.
Installing libmcrypt-2.5.8[0m
Uncompress libmcrypt-2.5.8.tar.gz...
cd libmcrypt-2.5.8...
checking build system type... ./config.guess: unable to guess system type
This script, last modified 2003-06-17, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
ftp://ftp.gnu.org/pub/gnu/config/
If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.
config.guess timestamp = 2003-06-17
uname -m = aarch64
uname -r = 4.11.12-pi64+
uname -s = Linux
uname -v = #1 SMP PREEMPT Sun Jul 30 20:18:20 CEST 2017
/usr/bin/uname -p =
/bin/uname -X =
hostinfo =
/bin/universe =
/usr/bin/arch -k =
/bin/arch =
/usr/bin/oslevel =
/usr/convex/getsysinfo =
UNAME_MACHINE = aarch64
UNAME_RELEASE = 4.11.12-pi64+
UNAME_SYSTEM= Linux
UNAME_VERSION = #1 SMP PREEMPT Sun Jul 30 20:18:20 CEST 2017
configure: error: cannot guess build type; you must specify one
aarch64架构下mycrypt、libmycrypt都没法编译安装,而且aarch64架构下官网上也没libmcrypt-dev的包,这个依赖包应该有10几年不更新了,不需要mcrypt扩展的话可以修改编译参数去掉,mycrypt扩展从 PHP 7.1.0 开始废弃;自 PHP 7.2.0 起,会移到 PECL。
回复 12# 的帖子
谢谢军哥 期待新版本回复 13# 的帖子
必须要mcrypt的话我也没办法,除非mcrypt更新并支持才行回复 14# 的帖子
不是必须要mcrypt,只是能正常使用php就可以了,
页:
[1]