0

当我输入时,我无法安装 php-devel:

  yum install php-devel


Resolving Dependencies
--> Running transaction check
---> Package php-devel.x86_64 0:7.4.0-1.el7.remi will be installed
--> Processing Dependency: php-cli(x86-64) = 7.4.0-1.el7.remi for package: php-devel-7.4.0-1.el7.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php-devel-7.4.0-1.el7.remi.x86_64 (remi-php74)
           Requires: php-cli(x86-64) = 7.4.0-1.el7.remi
           Installed: php-cli-7.4.1~RC1-1.el7.remi.x86_64 (@remi-modular-test)
               php-cli(x86-64) = 7.4.1~RC1-1.el7.remi
           Available: php-cli-5.4.16-46.el7.x86_64 (base)
               php-cli(x86-64) = 5.4.16-46.el7
           Available: php-cli-5.4.16-46.1.el7_7.x86_64 (updates)
               php-cli(x86-64) = 5.4.16-46.1.el7_7
           Available: php-cli-5.4.45-17.el7.remi.x86_64 (remi)
               php-cli(x86-64) = 5.4.45-17.el7.remi
           Available: php-cli-5.4.45-18.el7.remi.x86_64 (remi)
               php-cli(x86-64) = 5.4.45-18.el7.remi
           Available: php-cli-5.5.38-11.el7.remi.x86_64 (remi-php55)
               php-cli(x86-64) = 5.5.38-11.el7.remi
           Available: php-cli-5.5.38-12.el7.remi.x86_64 (remi-php55)
               php-cli(x86-64) = 5.5.38-12.el7.remi
           Available: php-cli-5.6.40-13.el7.remi.x86_64 (remi-php56)
               php-cli(x86-64) = 5.6.40-13.el7.remi
           Available: php-cli-5.6.40-14.el7.remi.x86_64 (remi-php56)
               php-cli(x86-64) = 5.6.40-14.el7.remi
           Available: php-cli-7.2.24-1.el7.remi.x86_64 (remi-php72)
               php-cli(x86-64) = 7.2.24-1.el7.remi
           Available: php-cli-7.2.25-1.el7.remi.x86_64 (remi-php72)
               php-cli(x86-64) = 7.2.25-1.el7.remi
           Available: php-cli-7.4.0~RC6-15.el7.remi.x86_64 (remi-php74)
               php-cli(x86-64) = 7.4.0~RC6-15.el7.remi
           Available: php-cli-7.4.0-1.el7.remi.x86_64 (remi-php74)
               php-cli(x86-64) = 7.4.0-1.el7.remi
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

如何解决这个问题?谢谢

操作系统:CentOS Linux 7 (Core) CPE 操作系统名称:cpe:/o:centos:centos:7 内核:Linux 3.10.0-1062.el7.x86_64 架构:x86-64 php版本:PHP 7.4.1RC1

4

2 回答 2

1

第一通知;PHP 7.4.1 尚未发布。

已安装:php-cli-7.4.1~RC1-1.el7.remi.x86_64 (@remi-modular-test)

不应启用此存储库(仅适用于可能想要在 EL-7 上使用模块的 DNF 用户)

yum-config-manager --disable remi-modular-test

而且您显然不需要提供旧 PHP 版本的存储库

yum-config-manager --disable remi-php55
yum-config-manager --disable remi-php56
yum-config-manager --disable remi-php70
yum-config-manager --disable remi-php71
yum-config-manager --disable remi-php72
yum-config-manager --disable remi-php73

因为你有 7.4.1~RC1 你需要启用 remi-php74-test

yum-config-manager --enable remi-php74-test
yum install php-devel

如果您更喜欢稳定版(目前为 7.4.0)

yum-config-manager --enable remi-php74
yum remove php-common
yum install php-devel

正如向导所解释的那样。

注意:php-devel包通常需要构建一个扩展,大多数常见的扩展在同一个存储库中以 RPM 的形式提供,请参阅完整列表

yum install php-<extension_name>
于 2019-12-13T08:44:17.200 回答
0

对于 PHP 7.2,这对我有用(注意remi-php72

sudo yum --enablerepo=remi,remi-php72 install php-devel autoconf automake
于 2020-03-20T05:34:04.150 回答