1. Please reinstall the libzip distribution

参考资料 https://www.cnblogs.com/gyfluck/p/10478386.html

升级Cmake,当前服务器的cmake版本较低,需要重新安装最高版本
当前cmake是最新版本直接跳过此步骤

  1. # 删除当前已安装
  2. yum remove cmake
  3. # 下载
  4. wget https://cmake.org/files/v3.14/cmake-3.14.5.tar.gz
  5. # 解压缩
  6. tar zxvf cmake-3.14.5.tar.gz
  7. # 配置
  8. ./configure --prefix=/usr/local/cmake
  9. # 安装
  10. make && make install
  11. # 创建链接
  12. ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake
  13. # 查看版本
  14. cmake -version

安装最新版本的libzip

  1. # 删除旧版本
  2. yum remove libzip libzip-devel
  3. # 下载新版本
  4. curl https://libzip.org/download/libzip-1.5.1.tar.gz
  5. # 解压到当前目录
  6. tar -zxvf libzip-1.5.1.tar.gz
  7. # 配置 & 安装
  8. cd libzip-1.5.1
  9. mkdir build
  10. cd build
  11. cmake ..
  12. make && make install

2. off_t undefined; check your library configuration

参考资讯 https://blog.csdn.net/github_38336924/article/details/88898655

第一步

  1. echo '/usr/local/lib64
  2. /usr/local/lib
  3. /usr/lib
  4. /usr/lib64'>>/etc/ld.so.conf

第二步

  1. ldconfig -v

3. unrecognized options: –with-mcrypt, –enable-gd-native-ttf

参考资料 https://www.qinziheng.com/php/4869.htm

将以上两个编译选项删除

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

参考资料 https://www.cnblogs.com/chenpingzhao/p/4820814.html

原因:服务器的虚拟内存不足引起的报错
解决:自行分配虚拟内存,再进行编译

查看当前配置

  1. free -m

Step1 创建虚拟内存文件

  1. mkdir /home/opt/images
  2. rm -rf /home/opt/images/swap
  3. dd if=/dev/zero of=/home/opt/images/swap bs=1024 count=2048000

Step2 启用文件

  1. mkswap /home/opt/images/swap

Step3 查看是否配置成功,执行 free -m

  1. total used free shared buff/cache available
  2. Mem: 992 178 137 0 676 670
  3. Swap: 1999 112 1887

Step4 回到php安装目录,重新编译

  1. make && make install

Step5 使用完毕,关闭文件

  1. cd /home/opt/images/
  2. swapoff swap
  3. rm -f /home/opt/images/swap

6. No package ‘sqlite3‘ found

  1. sudo apt-get install libsqlite3-dev

7. Please reinstall the BZip2 distribution

  1. sudo apt-get install libbz2-dev
  2. sudo 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

  1. # Ubuntu / Debian
  2. sudo apt-get install libcurl4-openssl-dev
  3. # RHEL / CentOS
  4. sudo yum install libcurl-devel
  5. # Mac OS
  6. brew install curl