下载安装包
|
1 |
https://www.php.net/distributions/php-7.3.10.tar.gz |
将压缩包放在/usr/local/src ,然后解压:
|
1 2 3 |
cd /usr/local/src wget -O php-7.3.10.tar.gz http://php.net/get/php-7.3.10.tar.gz/from/a/mirror tar -xvzf php-7.3.10.tar.gz |
然后开始配置:
|
1 2 3 4 5 |
cd php-7.3.10 yum -y install libcurl-devel yum -y install libXpm-devel yum -y install libxml2-devel ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql-sock=/tmp/mysql.sock --with-pdo-mysql=/usr/local/mysql --with-gd --with-png-dir=/usr/local/libpng --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype --with-xpm-dir=/usr/ --with-zlib-dir=/usr/local/zlib --with-iconv --enable-libxml --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-opcache --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-curl --enable-ctype --with-mysqli=/usr/bin/mysql_config |
配置完成:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
+--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+ Thank you for using PHP. config.status: creating php7.spec config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating sapi/fpm/php-fpm.conf config.status: creating sapi/fpm/www.conf config.status: creating sapi/fpm/init.d.php-fpm config.status: creating sapi/fpm/php-fpm.service config.status: creating sapi/fpm/php-fpm.8 config.status: creating sapi/fpm/status.html config.status: creating sapi/phpdbg/phpdbg.1 config.status: creating sapi/cgi/php-cgi.1 config.status: creating ext/phar/phar.1 config.status: creating ext/phar/phar.phar.1 config.status: creating main/php_config.h config.status: executing default commands |
报错汇总
报错1:configure: error: Cannot find OpenSSL's <evp.h>
解决方法:
|
1 2 |
yum install openssl -y yum install openssl-devel -y |
报错2:error: png.h not found
解决方法:
|
1 2 |
yum install libpng yum install libpng-devel |
报错3:error: freetype-config not found.
解决方法:
|
1 |
yum install freetype-devel |
报错4:Please reinstall the libzip distribution
解决方法:
|
1 2 3 4 5 6 7 8 |
yum remove libzip curl-O https://libzip.org/download/libzip-1.5.1.tar.gz tar -zxvf libzip-1.5.1.tar.gz cd libzip-1.5.1 mkdir build cd build cmake .. make && make install |
报错5:configure: error: Unable to find your mysql installation
解决方法:
安装mysql并配置准确的mysql地址
|
1 2 3 4 5 6 |
yum install mysql yum install mysql-devel wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm rpm -ivh mysql-community-release-el7-5.noarch.rpm yum install mysql-community-server service mysqld restart |
|
1 |
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-pdo-mysql=/usr/bin/mysql --with-mysql-sock=/tmp/mysql.sock --with-pdo-mysql=/usr/bin/mysql --with-gd --with-png-dir=/usr/local/libpng --with-jpeg-dir=/usr/local/jpeg --with-freetype-dir=/usr/local/freetype --with-xpm-dir=/usr/ --with-zlib-dir=/usr/local/zlib --with-iconv --enable-libxml --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-opcache --enable-mbregex --enable-fpm --enable-mbstring --enable-ftp --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-curl --enable-ctype --with-mysqli=/usr/bin/mysql_config |
报错6:configure: error: off_t undefined; check your library configuration
解决方法:
|
1 2 3 4 5 6 7 |
# 添加搜索路径到配置文件 echo '/usr/local/lib64 /usr/local/lib /usr/lib /usr/lib64'>>/etc/ld.so.conf # 更新配置 ldconfig -v |





最新评论
博主好,路过留言交流一下~我在做源头中转 Twinkle Model(利益相关):GPT 1折、国模 1折(GLM/DeepSeek/Kimi)、满血 Claude,低价稳定。价格全在模型广场 https://big-model.smart-agi.com/model-plaza ,有兴趣可以看看。
博主分享的 Surge 增强模式接管应用分流思路很赞!确实,系统大版本升级后,老牌 Proxifier 由于底层驱动兼容性问题经常莫名崩溃。在 Mac 上有 Surge 这种神器接管,但是在 Windows 平台上,很多人又很难找到兼顾‘轻量分流+稳定不崩溃’的工具:ProxiFyre 依赖 WireSock 内核驱动容易蓝屏且纯命令行,开 TUN 虚拟网卡又会把开发网段和公司 VPN 改乱。 如果是 Windows 用户寻找 Proxifier 替代品,非常推荐关注 Ghost Proxifier Pro: - 纯用户态 Winsock API Hook:完全免安装内核驱动和虚拟网卡,零蓝屏隐患,不改动系统默认网关与路由表; - 智能递归子进程树:很多现代客户端(如播放器、流媒体套件、IDE)会派生子进程,它能自动递归识别并接管流量,杜绝漏代理; - 现代 Fluent 图形界面:直接拖入目标 exe 即可一键绑定 SOCKS5/HTTP 节点,比老版配置规则直观很多。 注:该工具为非开源的独立客户端软件。 - 官网主页:https://ghostproxifier.com - 项目发布:https://github.com/liliBestCoder/ghost-proxifier-pro
曾经最爱之一,还有emlog,zblog
感谢分享经验,谢谢站长!!已收藏
牛牛牛
同样
站长您好,亚马逊云咨询推广资源,望建立联系,可邮件,谢谢。
换友情链接吗?