lnmp1.5安装php失败

本文记录了一次在Ubuntu18.04系统上安装LNMP(Linux+Nginx+MySQL+PHP)过程中遇到的问题及解决办法。在安装PHP时,由于freetype库版本不匹配导致安装失败。通过修改lnmp脚本中的freetype版本号,成功解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天自己的联想笔记装了ubuntu18.04。安装lnmp的时候发现php安装失败了。查看日志发现下面一段话

checking for ssize_t... yes
checking size of short... (cached) 2
checking size of int... (cached) 4
checking size of long... (cached) 8
checking size of long long... (cached) 8
checking size of off_t... 0
configure: error: off_t undefined; check your library configuration
make: *** No targets specified and no makefile found.  Stop.
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 78: pear: command not found
include/php.sh: line 79: pecl: command not found
include/php.sh: line 84: php: command not found
curl: (23) Failed writing body (0 != 16133)
Install ZendGuardLoader for PHP 7.2...
unavailable now.
Creating new php-fpm configure file...
Copy php-fpm init.d file...
cp: cannot stat ‘/home/install/lnmp1.5-full/lnmp1.5-full/src/php-7.2.6/sapi/fpm/init.d.php-fpm’: No such file or directory
chmod: cannot access ‘/etc/init.d/php-fpm’: No such file or directory

查了一下因为是因为在新版的系统中一freetype这个库更新了。修改脚本中对应的版本即可。在lnmp/include/version.sh中

#Freetype_Ver='freetype-2.7'      //注释用下面
Freetype_Ver='freetype-2.9'

这样重新安装即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

the ache

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值