PHP 7.4 checking for libzip 和 failed to open error_log 问题
来源: https://hqidi.com/154.html
两个深坑,成年阿根廷龙踩出来的坑,网上都没找到解决方法,都是自己摸索出来的。
前面一切顺利:
yum install -y libxml2 libxml2-devel libxml2-python curl curl-devel libjpeg libjpeg-devel libpng libpng-devel freetype-devel libmcrypt libmcrypt-devel gd gd-devel gcc-c++ gcc openssl openssl-devel libsqlite3x-devel oniguruma-devel libicu-devel wget https://www.php.net/distributions/php-7.4.2.tar.gz
tar xf php-7.4.2.tar.gz
cd php-7.4.2
./configure --prefix=/usr/local/php --enable-opcache --with-config-file-path=/usr/local/php/etc --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-fpm --enable-static --enable-inline-optimization --enable-sockets --with-zip --enable-calendar --enable-bcmath --enable-soap --enable-mbstring --with-zlib --with-iconv --enable-gd --with-xmlrpc --enable-mbstring --with-curl --with-freetype --with-mysql-sock=/var/lib/mysql/mysql.sock --disable-ipv6 --disable-debug --with-openssl --disable-maintainer-zts --enable-intl
至于configure的时候,配置参数的变更、弃用等这种小问题就不说了。
No package 'libzip' found
我不知道网上的教程是怎么回事,反正在centos7+PHP 7.4.2 环境下,网上的所有教程都不对,一个都不对
这个问题的完整报错如下:
checking for libzip >= 0.11... no
configure: error: Package requirements (libzip >= 0.11) were not met: No package 'libzip' found Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBZIP_CFLAGS
and LIBZIP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
报错提示非常明显,配置程序没有找到libzip库,你用yum安装libzip-devel的话,安装的版本是0.10,版本达不到要求。所以,此时我们需要卸载掉yum安装的libzip然后手动安装新版。
yum remove libzip libzip-devel
wget https://hqidi.com/big/libzip-1.2.0.tar.gz
tar -zxvf libzip-1.2.0.tar.gz
cd libzip-1.2.0
./configure
make && make install
在网上找到的教程到了这一步就直接让你继续在PHP源码目录里面执行configure程序继续配置了,其实你虽然已经安装了libzip1.2,但是PHP的configure程序依然找不到,不知道你安装在哪,你得告诉PHP的configure程序,我安装了libzip 1.2,并且安装在何处。以前是用ldconfig来通告系统所需动态库文件的位置,现在用pkg-config。
我刚刚提供的方法安装的libzip默认被安装到了 /usr/local/lib 在这个目录下你能看到libzip.so libzip.so.5 libzip.so.5.0.0 还有一个pkgconfig目录。
所以,真正的解决方法来了,在你configure的会话窗口直接输入如下内容:
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/"
上面命令的作用就是告诉configure程序,去/usr/local/lib 目录下找库文件,这样他就能找到libzip.so
此时,你继续./configure将会很顺利的看到
Thank you for using PHP.
PHP7报错Read-only file system (30)
当你照着 此文 安装好PHP,并做好systemd服务管理文件,你会发现用systemctl start php-fpm 无法正常启动php-fpm 报了一个很奇怪的错。
ERROR: failed to open error_log (/usr/local/php/var/log/php-fpm.log): Read-only file system (30)
此时,selinux是关闭状态,普通用户对这个文件也可写,问题就迷离了。
解决方法:
打开 /usr/lib/systemd/system/php-fpm.service 把
ProtectSystem=true
改成
ProtectSystem=false
当这个值为true的时候,php-fpm进程将以只读的方式挂载 /usr 目录,这就是问题所在。具体可参考
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#ProtectSystem=
原创文章,转载请注明: 转载自笛声
本文链接地址: PHP 7.4 checking for libzip 和 failed to open error_log 问题
PHP 7.4 checking for libzip 和 failed to open error_log 问题的更多相关文章
- 大数据集群ssh登录其他机器失败 RSA host key for zb03 has changed and you have requested strict checking. Host key verification failed.
[hadoop@zb02 .ssh]$ scp authorized_keys hadoop@zb03:/home/hadoop/.ssh @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...
- Checking Network Configuration requirements Failed
安装oracle执行检查,出现 Checking Network Configuration requirements ... Check complete. The overall result o ...
- SSH登录失败:Host key verification failed
转载自:https://help.aliyun.com/knowledge_detail/41471.html 注意:本文相关 Linux 配置及说明已在 CentOS 6.5 64 位操作系统中进行 ...
- SSH连接时出现Host key verification failed的原因及解决方法
SSH连接的时候Host key verification failed. [root@cache001 swftools-0.9.0]# ssh 192.168.1.90@@@@@@@@@@@@@@ ...
- 登录ssh时Host key verification failed错误
工作中总是测试不同的路由设备, 路由器的ip都是 192.168.111.1 ,ssh登录的时候总是出现这个错误. macos上,错误如下 spawn ssh -p 22 root@192.168.1 ...
- SCP传送文件时提示No ECDSA host key is known forx.x.x.x and you have requested strict checking.问题的解决办法
在使用SCP向其他设备传送文件时,打印如下错误: No ECDSA host key is known for x.x.x.x and you have requested strict checki ...
- ssh 报错Host key verification failed 或Ubuntu connect to serve 失败
ssh 报错Host key verification failed 或Ubuntu connect to serve 失败 通常是因为没有装ssh sudo apt-get install o ...
- 错误RSA host key for [ip address] has changed and you have requested strict checking.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ WARNING: REMOTE HOST IDENTIFICATION HAS ...
- 解决办法: RSA host key for [ip address] has changed and you have requested strict checking.
在服务器重装后想要远程连接服务器,报错如下: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE ...
随机推荐
- 深度学习框架如何自动选择最快的算法?Fast Run 让你收获最好的性能!
作者:王博文 | 旷视 MegEngine 架构师 一.背景 对于深度学习框架来说,网络的训练/推理时间是用户非常看中的.在实际生产条件下,用户设计的 NN 网络是千差万别,即使是同一类数学计算,参数 ...
- SQL 练习19
统计各科成绩各分数段人数:课程编号,课程名称,[100-85],[85-70],[70-60],[60-0] SELECT Course.CId,Course.Cname ,t.[0-60],t.[6 ...
- 题解—P2898 [USACO08JAN]Haybale Guessing G
pre 首先注意一下翻译里面并没有提到的一点,也是让我没看懂样例的一点,就是这个长度为 \(n\) 的数组里面的数各不相同. 有很多人用并查集写的这道题,题解里面也有一些用线段树写的,不过我认为我的做 ...
- vue+cesium初探(一) 加载cesium
参考文章1:https://www.cnblogs.com/laixiangran/p/4984522.html 参考文章2:https://blog.csdn.net/weixin_41940497 ...
- C++类的构造函数后面加一个冒号的含义
最近在看侯捷老师讲解的C++知识,他讲到在构造函数加一个冒号初始化值的方法,会使代码更大气,在此记录一下使用方法 构造函数冒号后的初始化class complex{public: complex(do ...
- 从元素抽取属性,文本和HTML
问题 在解析获得一个Document实例对象,并查找到一些元素之后,你希望取得在这些元素中的数据. 方法 要取得一个属性的值,可以使用Node.attr(String key) 方法 对于一个元素中的 ...
- C#异步编程 Task await的理解
async/await是C#5.0中推出的,先上用法: static void Main(string[] args) { Console.WriteLine("-------主线程启动-- ...
- 09.SpringMVC之类型转换
一. 类型转换器 前端传入的值,从表单中传入的值,都是字符串或者是字符串数组的形式传入的,在后端需要进行手动的转换类型,然后才能正确的使用. 框架一般对常见的数据类型的转换进行了封装提供,如字符串转换 ...
- leaflet获取arcgis服务图层所有信息
L.esri.query({ url: "http://127.0.0.1:6080/arcgis/rest/services/demo/ditu/MapServer/0" }). ...
- MZY项目笔记:session歧路
from my typora MZY项目笔记:session歧路 文章目录 MZY项目笔记:session歧路 那该怎么办? 1. 手动加上cookie的header. 2.自己模拟一个Session ...