欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

php编译安装过程中的报错以及处理方法!!!

程序员文章站 2024-02-27 23:55:39
...

报错1

checking build system type... Invalid configuration `./configure': machine `./configure' not recognized
configure: error: /bin/sh ./config.sub ./configure failed

处理方法
确定已安装

libtool
libtool-ltdl
libtool-ltdl-devel
如果没安装,使用yum  install  libtool
yum  install  libtool-ltdl
yum  install  libtool-ltdl-devel
 
然后将
/usr/share/libtool/config/config.guess
/usr/share/libtool/config/config.sub

复制到你当前要configure目录下

报错2

 configure: error: Please reinstall the libzip distribution
checking for libzip... configure: error: system libzip must be upgraded to version >= 0.11

处理方法
卸载重装

yum remove libzip -y

下载安装、编译libzip

wget https://nih.at/libzip/libzip-1.2.0.tar.gz
#libzip 1.4及以上版本安装需要cmake,此处选择1.2
tar -zxvf libzip-1.2.0.tar.gz cd libzip-1.2.0
./configure
  make
 make install

报错3

configure: error: off_t undefined; check your library configuration
[[email protected] ~]# vim /etc/ld.so.conf
 
include ld.so.conf.d/*.conf                          #此行原有
/usr/local/lib64
/usr/local/lib
/usr/lib
/usr/lib64
 
[[email protected] ~]# ldconfig -v  #如果有添加还是报错,就多执行一次这条命令就可以
[[email protected] ~]# echo 'ldconfig' >> /etc/rc.local

安装报错1

make: *** [ext/zip/php_zip.lo] 错误 1
make: *** 正在等待未完成的任务....
In file included from /root/php-7.3.4/ext/zip/php_zip.h:31:0,
                 from /root/php-7.3.4/ext/zip/zip_stream.c:29:
/usr/local/include/zip.h:59:21: 致命错误:zipconf.h:没有那个文件或目录

处理方法

[[email protected] php-7.3.4]# cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h
[[email protected] php-7.3.4]# make -j `grep processor /proc/cpuinfo | wc -l` && make install