解决libzip 和cmake版本问题
重新配置PHP7编译环境参数
checking for libzip... not foundconfigure: error: Please reinstall the libzip distribution[root@localhost php-7.3.4]# yum -y install libzip-develchecking for pkg-config... (cached) /usr/bin/pkg-configchecking for libzip... configure: error: system libzip must be upgraded to version >= 0.11[root@localhost php-7.3.4]# which libzip/usr/bin/which: no libzip in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/bin:/root/bin)[root@localhost php-7.3.4]# ll /usr/local/liblib/ lib64/ libexec/ libzip/ [root@localhost php-7.3.4]# ll /usr/local/libzip/bin/ include/ lib64/ share/ [root@localhost php-7.3.4]# ll /usr/local/libzip/bin/zipzipcmp zipmerge ziptool [root@localhost php-7.3.4]# ll /usr/local/libzip/bin总用量 80-rwxr-xr-x. 1 root root 24392 5月 9 16:04 zipcmp-rwxr-xr-x. 1 root root 18880 5月 9 16:04 zipmerge-rwxr-xr-x. 1 root root 34928 5月 9 16:04 ziptool[root@localhost php-7.3.4]# vim /etc/profileunset iPATH="$PATH:/usr/local/bin:/usr/local/libzip/bin"export PATH[root@localhost php-7.3.4]# source /etc/profile[root@localhost php-7.3.4]# libzip-1.5.2 无法安装 , 已经取消了 。
/root/devdir/libzip-1.5.2/build[root@localhost build]# cd ../../[root@localhost devdir]# wget -c https://nih.at/libzip/libzip-1.2.0.tar.gz[root@localhost devdir]# tar -zxvf libzip-1.2.0.tar.gz [root@localhost devdir]# cd libzip-1.2.0[root@localhost libzip-1.2.0]# lsaclocal.m4 config.sub libzip-uninstalled.pc.in README.mdAPI-CHANGES configure LICENSE regressAUTHORS configure.ac ltmain.sh srccmake-config.h.in depcomp m4 test-driverCMakeLists.txt examples Makefile.am THANKScmake-zipconf.h.in INSTALL Makefile.in TODO.mdcompile install-sh man xcodeconfig.guess lib missingconfig.h.in libzip.pc.in NEWS.md[root@localhost libzip-1.2.0]# ./configure [root@localhost libzip-1.2.0]# make -j4 &&make install【最终解决方案】cp ../libzip-1.5.2/build/lib/libzip.so /lib64/提示off_t类型没有定义 undefind , 解决方法:
[root@localhost ~]# cd devdir/php-7.3.4[root@localhost php-7.3.4]# vim /etc/ld.so.confld.so.conf ld.so.conf.d/ [root@localhost php-7.3.4]# vim /etc/ld.so.conf[root@localhost php-7.3.4]# vim /usr/lib64/Display all 588 possibilities? (y or n)[root@localhost php-7.3.4]# vim /usr/lib64/lDisplay all 538 possibilities? (y or n)[root@localhost php-7.3.4]# vim /usr/lib64/libDisplay all 535 possibilities? (y or n)[root@localhost php-7.3.4]# vim /etc/ld.so.confinclude ld.so.conf.d/*.conf/usr/local/lib64/usr/local/lib/usr/lib/usr/lib64[root@localhost php-7.3.4]# ldconfig -vldconfig: 多次给出路径“/lib”
文章插图
编译安装
文章插图
In file included from /root/devdir/php-7.3.4/ext/zip/php_zip.h:31:0, from /root/devdir/php-7.3.4/ext/zip/php_zip.c:36:/usr/local/include/zip.h:59:21: 致命错误:zipconf.h:没有那个文件或目录 #include <zipconf.h> ^编译中断 。make: *** [ext/zip/php_zip.lo] 错误 1解决方案:cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h[root@localhost php-7.3.4]# cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/测试PHP是否安装成功
Installing PEAR environment: /usr/local/php/lib/php/[PEAR] Archive_Tar - installed: 1.4.5[PEAR] Console_Getopt - installed: 1.4.2[PEAR] Structures_Graph- installed: 1.1.1[PEAR] XML_Util - installed: 1.4.3[PEAR] PEAR - installed: 1.10.9Wrote PEAR system config file at: /usr/local/php/etc/pear.confYou may want to add: /usr/local/php/lib/php to your php.ini include_path/root/devdir/php-7.3.4/build/shtool install -c ext/phar/phar.phar /usr/local/php/binln -s -f phar.phar /usr/local/php/bin/pharInstalling PDO headers: /usr/local/php/include/php/ext/pdo/[root@localhost php-7.3.4]# php -v-bash: php: 未找到命令[root@localhost php-7.3.4]# ll /usr/local/php/bin/ etc/ include/ lib/ php/ sbin/ var/ [root@localhost php-7.3.4]# ll /usr/local/php/bin/ppear pecl phar.phar php-cgi phpdbg peardev phar php php-config phpize [root@localhost php-7.3.4]# vim /etc/profile[root@localhost php-7.3.4]# source /etc/profile[root@localhost php-7.3.4]# php -vPHP 7.3.4 (cli) (built: May 9 2019 17:39:42) ( NTS )Copyright (c) 1997-2018 The PHP GroupZend Engine v3.3.4, Copyright (c) 1998-2018 Zend Technologies[root@localhost php-7.3.4]# 转载自:https://my.oschina.net/u/4127346/blog/3047778
【centos7系统源码编译安装PHP7.3.5版本】
推荐阅读
- 游戏|Epic官方自嘲三年就做出成就系统:伟大的胜利!
- 轻松搞懂汽车冷却系统的构造、原理
- iPhone 其他系统数据 如何清除
- centos7如何给用户设置sudo权限
- 支付系统整体架构详解
- 安卓手机恢复出厂设置,重置安卓手机系统的方法
- Linux系统故障问题汇总,值得永久收藏
- 怎样重装电脑主机系统 台式机重装系统
- 抖音推荐特征系统演进历程
- 5年迭代5次,抖音推荐系统演进历程