CentOS Linux release 7.4.1708 (Core)
,但在一些项目中需要 PHP 高于 5.4 版本,但我无法更新它。我使用了以下命令:rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
之后执行:
yum install php56w php56w-opcache
详见这里。
但是我遇到了以下错误:请问我该如何更新 PHP?Error: php56w-common conflicts with php-common-5.4.16-43.el7_4.x86_64
Error: Package: php56w-5.6.32-1.w6.x86_64 (webtatic)
Requires: httpd-mmn = 20051115
Installed: httpd-2.4.6-67.el7.centos.6.x86_64 (@updates)
httpd-mmn = 20120211
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
Available: httpd-2.4.6-67.el7.centos.x86_64 (base)
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
httpd-mmn = 20120211
Available: httpd-2.4.6-67.el7.centos.2.x86_64 (updates)
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
httpd-mmn = 20120211
Available: httpd-2.4.6-67.el7.centos.5.x86_64 (updates)
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
httpd-mmn = 20120211
Error: Package: php56w-common-5.6.32-1.w6.x86_64 (webtatic)
Requires: libgmp.so.3()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
sudo yum remove php-cli mod_php php-common
。 - undefinedphp-common
,但是问题依然存在。 - undefined