阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

yum安装php Requires: libzip5(x86-64) >= 1.3.2

150次阅读
没有评论

共计 3034 个字符,预计需要花费 8 分钟才能阅读完成。

在做实验时,使用 rpm 包安装 php 时,系统自带的版本总是很旧。想安装新版本的 php rpm 包时,又发现各种依赖包版本达不到要求。

Error: Package: php-pecl-zip-1.15.2-1.el6.remi.5.6.x86_64 (remi)
          Requires: libzip5(x86-64) >= 1.3.2
Error: Package: php-pecl-zip-1.15.2-1.el6.remi.5.6.x86_64 (remi)
          Requires: libzip.so.5()(64bit)

所以,只能从 remi 源来获取 php,但是只配置 remi 还不够,因为它只有 php 各个版本相关的包,其他依赖包 (如 libzip5) 和相关工具 (如 php-fpm) 都放在 remi safe 源中的,因此需要同时配置 remi 源和 remi safe 源,remi safe 中存放的是安装 php 过程中可能需要的包以及其他相关工具,例如依赖包 libzip5、php 容器 php-fpm。

[root@linuxidc ~]# cat /etc/yum.repos.d/remi.repo
[remi]
name=remirepo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/6/php56/x86_64/
enable=1
gpgcheck=0

[remisafe]
name=remisaferepo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/6/safe/x86_64/
enable=1
gpgcheck=0

再 yum 安装就一路顺利了。
yum –disablerepo=* –enablerepo=remi* -y install php php-fpm

Red Hat Enterprise Linux 7.3 下 PHP 安装  https://www.linuxidc.com/Linux/2017-05/143942.htm
《细说 PHP》高清扫描 PDF+ 光盘源码 + 全套教学视频 https://www.linuxidc.com/Linux/2014-03/97536.htm
CentOS 7.3 环境下 PHP7.0 安装  https://www.linuxidc.com/Linux/2017-08/146433.htm
CentOS 7.2 下编译安装 PHP7.0.10+MySQL5.7.14+Nginx1.10.1  https://www.linuxidc.com/Linux/2016-09/134804.htm
Linux 安装 PHP5 与 PHP7 共存  https://www.linuxidc.com/Linux/2018-01/150007.htm
Linux 安装 PHP 扩展模块详解  https://www.linuxidc.com/Linux/2018-01/150006.htm
CentOS 7 下 PHP 7.1.12 安装配置  https://www.linuxidc.com/Linux/2018-01/150508.htm
CentOS 7 下使用 MySQL 5.7 + PHP 7 + Apache 部署 Nextcloud  https://www.linuxidc.com/Linux/2017-12/149945.htm
Ubuntu 17.10 上安装 LEMP 环境(Nginx,MariaDB,PHP7.1)https://www.linuxidc.com/Linux/2017-12/149581.htm

PHP 的详细介绍:请点这里
PHP 的下载地址:请点这里 

在做实验时,使用 rpm 包安装 php 时,系统自带的版本总是很旧。想安装新版本的 php rpm 包时,又发现各种依赖包版本达不到要求。

Error: Package: php-pecl-zip-1.15.2-1.el6.remi.5.6.x86_64 (remi)
          Requires: libzip5(x86-64) >= 1.3.2
Error: Package: php-pecl-zip-1.15.2-1.el6.remi.5.6.x86_64 (remi)
          Requires: libzip.so.5()(64bit)

所以,只能从 remi 源来获取 php,但是只配置 remi 还不够,因为它只有 php 各个版本相关的包,其他依赖包 (如 libzip5) 和相关工具 (如 php-fpm) 都放在 remi safe 源中的,因此需要同时配置 remi 源和 remi safe 源,remi safe 中存放的是安装 php 过程中可能需要的包以及其他相关工具,例如依赖包 libzip5、php 容器 php-fpm。

[root@linuxidc ~]# cat /etc/yum.repos.d/remi.repo
[remi]
name=remirepo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/6/php56/x86_64/
enable=1
gpgcheck=0

[remisafe]
name=remisaferepo
baseurl=https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/6/safe/x86_64/
enable=1
gpgcheck=0

再 yum 安装就一路顺利了。
yum –disablerepo=* –enablerepo=remi* -y install php php-fpm

Red Hat Enterprise Linux 7.3 下 PHP 安装  https://www.linuxidc.com/Linux/2017-05/143942.htm
《细说 PHP》高清扫描 PDF+ 光盘源码 + 全套教学视频 https://www.linuxidc.com/Linux/2014-03/97536.htm
CentOS 7.3 环境下 PHP7.0 安装  https://www.linuxidc.com/Linux/2017-08/146433.htm
CentOS 7.2 下编译安装 PHP7.0.10+MySQL5.7.14+Nginx1.10.1  https://www.linuxidc.com/Linux/2016-09/134804.htm
Linux 安装 PHP5 与 PHP7 共存  https://www.linuxidc.com/Linux/2018-01/150007.htm
Linux 安装 PHP 扩展模块详解  https://www.linuxidc.com/Linux/2018-01/150006.htm
CentOS 7 下 PHP 7.1.12 安装配置  https://www.linuxidc.com/Linux/2018-01/150508.htm
CentOS 7 下使用 MySQL 5.7 + PHP 7 + Apache 部署 Nextcloud  https://www.linuxidc.com/Linux/2017-12/149945.htm
Ubuntu 17.10 上安装 LEMP 环境(Nginx,MariaDB,PHP7.1)https://www.linuxidc.com/Linux/2017-12/149581.htm

PHP 的详细介绍:请点这里
PHP 的下载地址:请点这里 

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计3034字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中