- 1. Please reinstall the libzip distribution
- 2. off_t undefined; check your library configuration
- 3. unrecognized options: –with-mcrypt, –enable-gd-native-ttf
- 4. unrecognized options: —with-mysql
- 5. virtual memory exhausted: Cannot allocate memory
- 6. No package ‘sqlite3‘ found
- 7. Please reinstall the BZip2 distribution
- 8. Package requirements (libcurl >= 7.15.5) were not met
1. Please reinstall the libzip distribution
升级Cmake,当前服务器的cmake版本较低,需要重新安装最高版本
当前cmake是最新版本直接跳过此步骤
# 删除当前已安装yum remove cmake# 下载wget https://cmake.org/files/v3.14/cmake-3.14.5.tar.gz# 解压缩tar zxvf cmake-3.14.5.tar.gz# 配置./configure --prefix=/usr/local/cmake# 安装make && make install# 创建链接ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake# 查看版本cmake -version
安装最新版本的libzip
# 删除旧版本yum remove libzip libzip-devel# 下载新版本curl https://libzip.org/download/libzip-1.5.1.tar.gz# 解压到当前目录tar -zxvf libzip-1.5.1.tar.gz# 配置 & 安装cd libzip-1.5.1mkdir buildcd buildcmake ..make && make install
2. off_t undefined; check your library configuration
参考资讯 https://blog.csdn.net/github_38336924/article/details/88898655
第一步
echo '/usr/local/lib64/usr/local/lib/usr/lib/usr/lib64'>>/etc/ld.so.conf
第二步
ldconfig -v
3. unrecognized options: –with-mcrypt, –enable-gd-native-ttf
将以上两个编译选项删除
4. unrecognized options: —with-mysql
参考资料 https://blog.csdn.net/zhou75771217/article/details/83303058
php7版本不支持mysql模块
改用—with-pdo-mysql
5. virtual memory exhausted: Cannot allocate memory
原因:服务器的虚拟内存不足引起的报错
解决:自行分配虚拟内存,再进行编译
查看当前配置
free -m
Step1 创建虚拟内存文件
mkdir /home/opt/imagesrm -rf /home/opt/images/swapdd if=/dev/zero of=/home/opt/images/swap bs=1024 count=2048000
Step2 启用文件
mkswap /home/opt/images/swap
Step3 查看是否配置成功,执行 free -m
total used free shared buff/cache availableMem: 992 178 137 0 676 670Swap: 1999 112 1887
Step4 回到php安装目录,重新编译
make && make install
Step5 使用完毕,关闭文件
cd /home/opt/images/swapoff swaprm -f /home/opt/images/swap
6. No package ‘sqlite3‘ found
sudo apt-get install libsqlite3-dev
7. Please reinstall the BZip2 distribution
sudo apt-get install libbz2-devsudo yum install bzip2-devel
8. Package requirements (libcurl >= 7.15.5) were not met
参考地址:https://www.cpming.top/p/package-requirements-libcurl-7-15-5-were-not-met
# Ubuntu / Debiansudo apt-get install libcurl4-openssl-dev# RHEL / CentOSsudo yum install libcurl-devel# Mac OSbrew install curl
