VPS侦探论坛

 找回密码
 注册
查看: 5424|回复: 14

[已解决]lnmp1.4版树莓派3 arm64 debian9 mysql编译失败

[复制链接]
发表于 2017-8-9 14:32:46 | 显示全部楼层 |阅读模式

我使用的是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[2]: *** [libmysql/CMakeFiles/clientlib.dir/__/sql-common/client_plugin.c.o] Error 1
CMakeFiles/Makefile2:2745: recipe for target 'libmysql/CMakeFiles/clientlib.dir/all' failed
make[1]: *** [libmysql/CMakeFiles/clientlib.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] 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 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-8-9 18:57:50 | 显示全部楼层


不清楚原因
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-8-9 21:22:59 | 显示全部楼层

回复 2# 的帖子


http://blog.csdn.net/dlutxie/article/details/8654677   看了一下这个帖子,里面好像有提到mysql 5.5在arm上编译的add_plugin的问题   感觉好像是代码本身存在问题
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-8-10 11:06:07 | 显示全部楼层

回复 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的判断中
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-8-10 13:50:30 | 显示全部楼层

回复 4# 的帖子


查了一下好像是raspberry pi3开始才是aarch64的,你那边测试安装可以了不

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2017-8-10 13:54:37 | 显示全部楼层

回复 5# 的帖子


mysql可以了  php又有问题了
我是把你Get_ARM里面改成下面这样 临时解决的
Get_ARM()
{
    if uname -m | grep -Eqi "aarch64"; then
        Is_ARM='y'
    fi  
}
 楼主| 发表于 2017-8-10 13:55:29 | 显示全部楼层

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 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-8-10 14:03:17 | 显示全部楼层

回复 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吗?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2017-8-10 20:27:21 | 显示全部楼层

回复 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/ 目录下
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2017-8-10 21:55:05 | 显示全部楼层

回复 9# 的帖子




有这个目录/usr/include/aarch64-linux-gnu/curl   正在重新安装lnmp  谢谢军哥 我先试下
 楼主| 发表于 2017-8-11 09:17:01 | 显示全部楼层

军哥(上次只是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 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2017-8-11 17:40:00 | 显示全部楼层

回复 11# 的帖子


configure: error: cannot guess build type; you must specify one
make: *** No targets specified and no makefile found.  Stop.
[+] Installing libmcrypt-2.5.8
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。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-8-11 18:13:04 | 显示全部楼层

回复 12# 的帖子

谢谢军哥 期待新版本
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-8-12 13:07:13 | 显示全部楼层

回复 13# 的帖子

必须要mcrypt的话我也没办法,除非mcrypt更新并支持才行

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2017-8-13 21:08:54 | 显示全部楼层

回复 14# 的帖子

不是必须要mcrypt,只是能正常使用php就可以了,
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-18 02:47 , Processed in 0.031388 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表