gpt4 book ai didi

yum 更新后 PHP 无法在 CentOS 6 上运行

转载 作者:太空宇宙 更新时间:2023-11-04 04:34:19 25 4
gpt4 key购买 nike

我在运行 yum update 时遇到了一些问题,并执行了以下步骤使其正常工作:

  1. sudo yum --enablerepo=remi,remi-php55 -y remove memcached - 这只是删除了 memcached,它是给出错误的软件包之一
  2. sudo yum --enablerepo=remi,remi-php55 -y 删除 php-pear - 这删除的内容超出了我的预期..

Running Transaction Erasing : phpMyAdmin-4.0.4-1.el6.remi.noarch 1/28 waarschuwing: /etc/httpd/conf.d/phpMyAdmin.conf saved as /etc/httpd/conf.d/phpMyAdmin.conf.rpmsave Erasing : php-pecl-memcached-2.1.0-6.el6.remi.5.x86_64
2/28 Erasing : php-pecl-igbinary-1.1.2-0.5.git3b8ab7e.el6.remi.1.x86_64
3/28 Erasing : php-php-gettext-1.0.11-4.el6.remi.noarch
4/28 Erasing : php-pecl-mongo-1.4.1-1.el6.remi.1.x86_64
5/28 Erasing : php-pecl-sqlite-2.0.0-0.3.svn313074.el6.remi.5.x86_64
6/28 Erasing : php-pecl-memcache-3.0.8-1.el6.remi.1.x86_64
7/28 Erasing : php-pecl-apc-3.1.15-0.3.svn329913.el6.remi.1.x86_64
8/28 Erasing : php-5.5.0-1.el6.remi.x86_64
9/28 Erasing : php-gmp-5.5.0-1.el6.remi.x86_64
10/28 Erasing : php-mysqlnd-5.5.0-1.el6.remi.x86_64
11/28 Erasing : php-recode-5.5.0-1.el6.remi.x86_64
12/28 Erasing : php-tcpdf-dejavu-sans-fonts-6.0.049-1.el6.noarch 13/28 Erasing : php-tcpdf-6.0.049-1.el6.noarch
14/28 Erasing : php-bcmath-5.5.0-1.el6.remi.x86_64
15/28 Erasing : php-gd-5.5.0-1.el6.remi.x86_64
16/28 Erasing : php-mbstring-5.5.0-1.el6.remi.x86_64
17/28 Erasing : php-mcrypt-5.5.0-1.el6.remi.x86_64
18/28 Erasing : php-tidy-5.5.0-1.el6.remi.x86_64
19/28 Erasing : php-pgsql-5.5.0-1.el6.remi.x86_64
20/28 Erasing : php-pdo-5.5.0-1.el6.remi.x86_64
21/28 Erasing : php-intl-5.5.0-1.el6.remi.x86_64
22/28 Erasing : php-cli-5.5.0-1.el6.remi.x86_64
23/28 Erasing : php-process-5.5.0-1.el6.remi.x86_64
24/28 Erasing : php-xml-5.5.0-1.el6.remi.x86_64
25/28 Erasing : php-common-5.5.0-1.el6.remi.x86_64
26/28 waarschuwing: /etc/php.ini saved as /etc/php.ini.rpmsave
Erasing : php-pecl-jsonc-1.3.1-2.el6.remi.1.x86_64
27/28 Erasing : 1:php-pear-1.9.5-10.el6.remi.noarch
28/28 /usr/bin/pecl: regel 2: /usr/bin/php: Bestand of map bestaat niet /usr/bin/pecl: regel 2: exec: Kan /usr/bin/php niet uitvoeren: Bestand of map bestaat niet waarschuwing: /etc/pear.conf saved as /etc/pear.conf.rpmsave Verifying : php-bcmath-5.5.0-1.el6.remi.x86_64
1/28 Verifying : php-5.5.0-1.el6.remi.x86_64
2/28 Verifying : php-pecl-apc-3.1.15-0.3.svn329913.el6.remi.1.x86_64
3/28 Verifying : php-php-gettext-1.0.11-4.el6.remi.noarch
4/28 Verifying : php-mbstring-5.5.0-1.el6.remi.x86_64
5/28 Verifying : php-intl-5.5.0-1.el6.remi.x86_64
6/28 Verifying : phpMyAdmin-4.0.4-1.el6.remi.noarch
7/28 Verifying : php-tcpdf-6.0.049-1.el6.noarch
8/28 Verifying : php-tcpdf-dejavu-sans-fonts-6.0.049-1.el6.noarch 9/28 Verifying : php-recode-5.5.0-1.el6.remi.x86_64
10/28 Verifying : php-mcrypt-5.5.0-1.el6.remi.x86_64
11/28 Verifying : php-pecl-memcache-3.0.8-1.el6.remi.1.x86_64
12/28 Verifying : php-common-5.5.0-1.el6.remi.x86_64
13/28 Verifying : php-cli-5.5.0-1.el6.remi.x86_64
14/28 Verifying : 1:php-pear-1.9.5-10.el6.remi.noarch
15/28 Verifying : php-pecl-sqlite-2.0.0-0.3.svn313074.el6.remi.5.x86_64
16/28 Verifying : php-xml-5.5.0-1.el6.remi.x86_64
17/28 Verifying : php-pecl-mongo-1.4.1-1.el6.remi.1.x86_64
18/28 Verifying : php-tidy-5.5.0-1.el6.remi.x86_64
19/28 Verifying : php-pgsql-5.5.0-1.el6.remi.x86_64
20/28 Verifying : php-pdo-5.5.0-1.el6.remi.x86_64
21/28 Verifying : php-process-5.5.0-1.el6.remi.x86_64
22/28 Verifying : php-pecl-igbinary-1.1.2-0.5.git3b8ab7e.el6.remi.1.x86_64
23/28 Verifying : php-pecl-memcached-2.1.0-6.el6.remi.5.x86_64
24/28 Verifying : php-gd-5.5.0-1.el6.remi.x86_64
25/28 Verifying : php-pecl-jsonc-1.3.1-2.el6.remi.1.x86_64
26/28 Verifying : php-gmp-5.5.0-1.el6.remi.x86_64
27/28 Verifying : php-mysqlnd-5.5.0-1.el6.remi.x86_64
28/28

Removed: php-pear.noarch 1:1.9.5-10.el6.remi

Dependency Removed: php.x86_64 0:5.5.0-1.el6.remi
php-bcmath.x86_64 0:5.5.0-1.el6.remi
php-cli.x86_64 0:5.5.0-1.el6.remi
php-common.x86_64 0:5.5.0-1.el6.remi
php-gd.x86_64 0:5.5.0-1.el6.remi
php-gmp.x86_64 0:5.5.0-1.el6.remi
php-intl.x86_64 0:5.5.0-1.el6.remi
php-mbstring.x86_64 0:5.5.0-1.el6.remi
php-mcrypt.x86_64 0:5.5.0-1.el6.remi
php-mysqlnd.x86_64 0:5.5.0-1.el6.remi
php-pdo.x86_64 0:5.5.0-1.el6.remi
php-pecl-apc.x86_64 0:3.1.15-0.3.svn329913.el6.remi.1
php-pecl-igbinary.x86_64 0:1.1.2-0.5.git3b8ab7e.el6.remi.1
php-pecl-jsonc.x86_64 0:1.3.1-2.el6.remi.1
php-pecl-memcache.x86_64 0:3.0.8-1.el6.remi.1
php-pecl-memcached.x86_64 0:2.1.0-6.el6.remi.5
php-pecl-mongo.x86_64 0:1.4.1-1.el6.remi.1
php-pecl-sqlite.x86_64 0:2.0.0-0.3.svn313074.el6.remi.5
php-pgsql.x86_64 0:5.5.0-1.el6.remi
php-php-gettext.noarch 0:1.0.11-4.el6.remi
php-process.x86_64 0:5.5.0-1.el6.remi
php-recode.x86_64 0:5.5.0-1.el6.remi
php-tcpdf.noarch 0:6.0.049-1.el6
php-tcpdf-dejavu-sans-fonts.noarch 0:6.0.049-1.el6
php-tidy.x86_64 0:5.5.0-1.el6.remi
php-xml.x86_64 0:5.5.0-1.el6.remi
phpMyAdmin.noarch 0:4.0.4-1.el6.remi

  • sudo yum --enablerepo=remi update - 这仅更新 mysql,而不更新 apache 或 php
  • sudo yum --enablerepo=remi install php-pear - 这再次安装了 php,但版本为 5.4.40
  • Install 5 Package(s)

    Total download size: 5.4 M Installed size: 21 M Is this ok [y/N]: y Downloading Packages: (1/5): php-cli-5.4.40-1.el6.remi.x86_64.rpm
    | 3.9 MB 00:00 (2/5): php-common-5.4.40-1.el6.remi.x86_64.rpm | 959 kB 00:00 (3/5): php-pear-1.9.5-10.el6.remi.noarch.rpm
    | 357 kB 00:00 (4/5): php-process-5.4.40-1.el6.remi.x86_64.rpm | 64 kB 00:00 (5/5): php-xml-5.4.40-1.el6.remi.x86_64.rpm
    | 174 kB 00:00

  • sudo yum --enablerepo=remi,remi-php55 update - 这将 php 更新到版本 5.5.24,这就是我想要的
  • Dependency Installed: php-pecl-jsonc.x86_64 0:1.3.7-1.el6.remi.5.5
    php-pecl-zip.x86_64 0:1.12.5-1.el6.remi.5.5

    Updated: php-cli.x86_64 0:5.5.24-1.el6.remi
    php-common.x86_64 0:5.5.24-1.el6.remi php-process.x86_64 0:5.5.24-1.el6.remi php-xml.x86_64 0:5.5.24-1.el6.remi

    然后我重新启动了 apache 和 mysql。

    现在,当我访问该服务器上的任何(Wordpress)网站时,它们要么以纯文本形式显示 Apache 2 测试页,要么以纯文本形式显示 index.php 的内容(不执行 php)。

    我在 Stackoverflow 上浏览了一下,发现了一些关于添加的内容:LoadModule php5_module 模块/libphp5.so

    但不幸的是该文件不存在。找到 libphp5.so 给出/usr/lib64/httpd/modules/libphp5.so 但是LoadModule php5_module/usr/lib64/httpd/modules/libphp5.so重新启动 apache 时出错..

    我认为我删除的 php 软件包比预期的要多,但我不确定缺少哪些软件包,应该重新安装。有人能指出我正确的方向吗?并告诉我是否应该重新安装 apache?我不想丢失任何配置..

    最佳答案

    最终我以某种方式解决了这个问题。我删除并(重新)安装了 httpd、php、php-common、php-cli、php-pear、php-mysql 中的所有内容,还安装了 httpd-devel 和 php-devel

    在这个过程中我还手动创建了一个php.conf/etc/httpd/conf.d/

    我还从 centos forums 运行了这个:rpm -qa 'php*'rpm -V php

    最终在这个过程中创建了正确的 php.conf,并且在重新启动 apache 后一切都恢复正常。

    关于yum 更新后 PHP 无法在 CentOS 6 上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30026973/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com