php - 尝试在 CentOS 7 上将 PHP 从 5.4 更新到 5.6 - 出现错误(现在网站关闭)

标签 php apache centos

我试图更新我的 PHP,但是当我使用 yum update php 时,这就是我得到的:

Error: Package: gd-last-2.2.4-1.el6.remi.x86_64 (remi)
           Requires: libwebp.so.5()(64bit)
Error: Package: php-mysql-5.4.45-13.el6.remi.x86_64 (remi)
           Requires: php-pdo(x86-64) = 5.4.45-13.el6.remi
           Removing: php-pdo-5.4.16-42.el7.x86_64 (@base)
               php-pdo(x86-64) = 5.4.16-42.el7
           Updated By: php-pdo-5.6.30-1.el6.remi.x86_64 (remi-php56)
               php-pdo(x86-64) = 5.6.30-1.el6.remi
           Available: php-pdo-5.4.45-13.el6.remi.x86_64 (remi)
               php-pdo(x86-64) = 5.4.45-13.el6.remi
           Available: php-pdo-5.6.29-1.el6.remi.x86_64 (remi-php56)
               php-pdo(x86-64) = 5.6.29-1.el6.remi
Error: Package: php-5.6.30-1.el6.remi.x86_64 (remi-php56)
           Requires: httpd-mmn = 20051115
           Installed: httpd-2.4.6-40.el7.centos.4.x86_64 (@updates)
               httpd-mmn = 20120211
               httpd-mmn = 20120211x8664
               httpd-mmn = 20120211-x86-64
           Available: httpd-2.4.6-45.el7.centos.x86_64 (base)
               httpd-mmn = 20120211x8664
               httpd-mmn = 20120211-x86-64
               httpd-mmn = 20120211
           Available: httpd-2.4.6-45.el7.centos.4.x86_64 (updates)
               httpd-mmn = 20120211x8664
               httpd-mmn = 20120211-x86-64
               httpd-mmn = 20120211
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我尝试使用--skip-broken,然后重新启动,但我的版本没有帮助。我搜索了这个站点,发现了一个我关注的线程(Can't install PHP Package on CentOS)。

基本上这是我首先输入的内容:
yum install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum clean
yum update

得到与以前完全相同的错误(所以我猜它什么也没做)。然后我这样做了:
yum update -y; yum remove httpd && yum install httpd; yum install php56w-common php56w-opcache php56w-mysql

这是我得到的错误(所以我虽然部分问题已经解决):
Error: Package: gd-last-2.2.4-1.el6.remi.x86_64 (remi)
           Requires: libwebp.so.5()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

但以防万一,我访问了我的网站,现在收到 502 错误 :( :( - 我什至无法连接到 Sentora(我已经安装了)。当我尝试重新安装 sentora 时(这样它可能会修复它) ),它说它需要一个干净的服务器,因为 mariadb 已经安装了!! 请帮助我!!

问候

最佳答案

Error: Package: php-5.6.30-1.el6.remi.x86_64 (remi-php56) Requires: httpd-mmn = 20051115 Installed: httpd-2.4.6-40.el7.centos.4.x86_64 (@updates)



您显然有一个糟糕的配置,在 CentOS 7 服务器上混合了 CentOS 6 的存储库。

因此,删除安装错误的软件包:
yum remove remi-release epel-release webtatic-release
yum clean all

然后,查看 configuration wizard并为 remi 和 epel 存储库安装正确的配置包。

关于php - 尝试在 CentOS 7 上将 PHP 从 5.4 更新到 5.6 - 出现错误(现在网站关闭),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43655140/

相关文章:

php - 将第三个表添加到联接

php - 如何设置拆分测试?

php - 如何让 Apache 停止缓冲 POST 数据?

linux - "can not fork user shell: Cannot allocate memory"

docker运行图像,但无法获得响应

javascript - 在 Javascript 函数中编写 PHP

php - 通过外键获取 MySQL

apache - 如何使用.htaccess将/wp-admin/admin.php?page=something重写为/wp-admin/something

Java Apache FTP 服务器崩溃

php - Centos sendmail配置失败-用户未知