【问题标题】:Trying to update PHP from 5.4 to 5.6 on CentOS 7 - Getting an error (and website down now)尝试在 CentOS 7 上将 PHP 从 5.4 更新到 5.6 - 出现错误(现在网站关闭)
【发布时间】:2017-04-27 10:27:03
【问题描述】:

我试图更新我的 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 已经安装了!!请帮助我!!

问候

【问题讨论】:

    标签: php apache centos


    【解决方案1】:

    错误:包:php-5.6.30-1.el6.remi.x86_64 (remi-php56) 要求:httpd-mmn = 20051115 已安装: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 存储库安装正确的配置包。

    【讨论】:

      【解决方案2】:

      您可以检查 /etc/yum.conf 文件并查看 httpd 和/或 httpd* 软件包是否被排除在更新之外。如果是这样,请修改 yum.conf 排除行并删除 httpd* 包,运行 'yum clean all',然后再次尝试更新 PHP。

      【讨论】:

        【解决方案3】:

        你更新了你的epel,但没有清理。

        您可以使用以下命令来安装您的 php5.6:

        yum clean all
        yum install php56w
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2021-04-27
          • 2015-08-24
          • 2018-06-07
          • 2018-12-27
          • 1970-01-01
          • 1970-01-01
          • 2021-05-27
          • 1970-01-01
          相关资源
          最近更新 更多