宝塔面板中安装php8以上环境,提示: configure: error: iconv does not support errno
问题:宝塔面板中安装php8 编译时提示configure: error: iconv does not support errno
# 下面这些是配置yum源和epel源,阿里云ecs在centos8测试成功
wget http://mirrors.cloud.aliyuncs.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo &&
wget http://mirrors.cloud.aliyuncs.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo
sed -i 's/http:\/\/mirrors.cloud.aliyuncs.com/url_tmp/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo && sed -i 's/http:\/\/mirrors.aliyun.com/http:\/\/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo && sed -i 's/url_tmp/http:\/\/mirrors.aliyun.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo &&
sed -i 's/http:\/\/mirrors.aliyun.com/http:\/\/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/epel-archive-8.repo
yum clean all && yum makecache
dnf config-manager --set-enabled PowerTools
yum install epel-release
yum makecache
dnf install libticonv libticonv-devel
下载安装
wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz
tar -xzvf libiconv-1.17.tar.gz
cd libiconv-1.17
./configure --prefix=/usr/local/libiconv
1.cli模式下安装php8.0
cd /www/server/php/80/src
./configure --with-iconv=/usr/local/bin/
make && make install
php -v
#PHP 8.0.26 (cli) (built: May 21 2023 13:30:11) ( NTS )
#Copyright (c) The PHP Group
#Zend Engine v4.0.26, Copyright (c) Zend Technologies
提示安装成功
2.宝塔面板安装
--with-iconv=/usr/local/bin/
#Build complete.
#Don't forget to run 'make test'.
#Installing shared extensions: /www/server/php/80/lib/php/extensions/#no-debug-non-zts-20200930/
#Starting php-fpm done
提示成功
提示:宝塔安装需要打补丁,否则安装不成功
总结:宝塔php8以上的包里面iconv包出现问题,php8以下版本不影响,以上测试仅支持宝塔面板,如果是第三方集成环境或者php8官方包则不会出现此类问题。
项目介绍
基于Laravel 9 + Vue + MySQL的快速开发的后台管理系统。
支持php8.0版本
技术交流QQ群:533738074 加群请备注来源:如gitee、github、官网等
。
站点地址
-
官方网站:http://ruan.scmls.cn
-
文档地址:http://doc.scmls.cn
-
演示地址:http://mango.scmls.cn/admin(账号:admin,密码:123456。备注:只有查看信息的权限)
更多推荐
所有评论(0)