【问题标题】:installing new php version 5.6 in ssh server在 ssh 服务器中安装新的 php 版本 5.6
【发布时间】:2018-04-20 14:54:34
【问题描述】:

所以我使用 puTTy 和 ssh 连接来访问服务器。

我按照here的说明进行操作。

我已经正确安装了 apache/httpd 和 mysql/mariadb。

但是在安装php的时候卡住了。

在我输入命令之后

sudo yum install php56w php56w-mysql php56w-mcrypt php56w-gd php56w-curl

它会给我这个安装结果:

Loaded plugins: fastestmirror
base                                                                                         | 3.6 kB  00:00:00
epel/x86_64/metalink                                                                         | 6.3 kB  00:00:00
epel                                                                                         | 4.7 kB  00:00:00
extras                                                                                       | 3.4 kB  00:00:00
remi-safe                                                                                    | 2.9 kB  00:00:00
updates                                                                                      | 3.4 kB  00:00:00
vz-base                                                                                      |  951 B  00:00:00
vz-updates                                                                                   |  951 B  00:00:00
webtatic                                                                                     | 3.6 kB  00:00:00
(1/3): epel/x86_64/updateinfo                                                                | 846 kB  00:00:00
(2/3): epel/x86_64/primary_db                                                                | 6.1 MB  00:00:01
(3/3): remi-safe/primary_db                                                                  | 1.1 MB  00:00:01
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * epel: ftp.riken.jp
 * extras: ftp.iij.ad.jp
 * remi-safe: mirrors.mediatemple.net
 * updates: ftp.iij.ad.jp
 * webtatic: sp.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php56w.x86_64 0:5.6.31-2.w7 will be installed
--> Processing Dependency: php56w-cli(x86-64) = 5.6.31-2.w7 for package: php56w-5.6.31-2.w7.x86_64
--> Processing Dependency: php56w-cli = 5.6.31-2.w7 for package: php56w-5.6.31-2.w7.x86_64
---> Package php56w-common.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-gd.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-mcrypt.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-mysql.x86_64 0:5.6.31-2.w7 will be installed
--> Processing Dependency: php56w-pdo(x86-64) for package: php56w-mysql-5.6.31-2.w7.x86_64
--> Running transaction check
---> Package php56w-cli.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-pdo.x86_64 0:5.6.31-2.w7 will be installed
Removing php56w-cli.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-cli-5.6.26-1.el7.remi.x86_64
Removing php56w-common.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-common-5.6.26-1.el7.remi.x86_64
Removing php56w-gd.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-gd-5.6.26-1.el7.remi.x86_64
Removing php56w-mcrypt.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-mcrypt-5.6.26-1.el7.remi.x86_64
Removing php56w-mysql.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-mysqlnd-5.6.26-1.el7.remi.x86_64
Removing php56w-pdo.x86_64 0:5.6.31-2.w7 - u due to obsoletes from installed php-pdo-5.6.26-1.el7.remi.x86_64
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package php56w-cli.x86_64 0:5.6.31-2.w7 will be installed
--> Processing Dependency: php56w-cli(x86-64) = 5.6.31-2.w7 for package: php56w-5.6.31-2.w7.x86_64
--> Processing Dependency: php56w-cli = 5.6.31-2.w7 for package: php56w-5.6.31-2.w7.x86_64
---> Package php56w-common.x86_64 0:5.6.31-2.w7 will be installed
--> Processing Dependency: php56w-common(x86-64) = 5.6.31-2.w7 for package: php56w-5.6.31-2.w7.x86_64
---> Package php56w-gd.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-mcrypt.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-mysql.x86_64 0:5.6.31-2.w7 will be installed
---> Package php56w-pdo.x86_64 0:5.6.31-2.w7 will be installed
--> Finished Dependency Resolution
Error: Package: php56w-5.6.31-2.w7.x86_64 (webtatic)
           Requires: php56w-cli = 5.6.31-2.w7
           Available: php56w-cli-5.6.31-1.w7.x86_64 (webtatic)
               php56w-cli = 5.6.31-1.w7
Error: Package: php56w-5.6.31-2.w7.x86_64 (webtatic)
           Requires: php56w-common(x86-64) = 5.6.31-2.w7
           Available: php56w-common-5.6.31-1.w7.x86_64 (webtatic)
               php56w-common(x86-64) = 5.6.31-1.w7
Error: Package: php56w-5.6.31-2.w7.x86_64 (webtatic)
           Requires: php56w-cli(x86-64) = 5.6.31-2.w7
           Available: php56w-cli-5.6.31-1.w7.x86_64 (webtatic)
               php56w-cli(x86-64) = 5.6.31-1.w7
 You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
openssh-clients-6.6.1p1-25.el7_2.x86_64 has missing requires of openssh = ('0', '6.6.1p1', '25.el7_2')

可能是什么问题?

【问题讨论】:

  • 关于专业服务器或网络相关基础设施管理的问题对于 Stack Overflow 来说是题外话,除非它们直接涉及编程或编程工具。您可以通过Server Fault 获得帮助。 - 投票迁移这个问题。
  • 不要尝试同时使用“remi”和“webtatic”。由于 5.6.26 已经从“remi-php56”安装,只需启用它,请参阅rpms.remirepo.net/wizard

标签: php mysql apache ssh


【解决方案1】:

安装 Yum-Utils 以管理存储库

yum install yum-utils

安装 EPEL、Remi 和 yum-utils 后,您现在可以通过使用 yum-config-manager 启用 remi 存储库,继续在 CentOS 6 发行版上安装 PHP 5.4、PHP 5.5 或 PHP 5.6 以及所有必需的模块

yum-config-manager --enable remi-php56
yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

我试过了,它奏效了。谢谢

【讨论】:

    【解决方案2】:

    出现问题是因为 php56w 和 php 包在不同的存储库中提供,因此它们相互冲突。

    来自 remi 存储库的 php 已经安装,而来自 webtatic 的 php56w 将被安装。 This solution 应该在这里提供帮助。

    【讨论】:

      猜你喜欢
      • 2014-09-10
      • 2016-03-23
      • 2014-09-21
      • 2013-09-13
      • 2018-08-06
      • 2016-03-12
      • 2014-09-07
      • 2023-03-30
      • 2017-04-25
      相关资源
      最近更新 更多