无法在RHEL5上安装PHP,MySQL

时间:2014-04-08 15:06:10

标签: rpm yum rhel

我正在尝试在RHEL 5.7 VM上的Apache Web服务器上安装PHP和MySql。我试着用下面的yum Remi和EPEL回购来做这件事:

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

每当我尝试这样做时,看起来都有“缺失依赖”:

yum --enablerepo=remi,remi-test install mysql mysql-server php php-common

然后,我收到以下错误:

--> Finished Dependency Resolution
mysql-server-5.5.37-1.el5.remi.x86_64 from remi has depsolving problems
  --> Missing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
php-cli-5.4.27-1.el5.remi.x86_64 from remi has depsolving problems
  --> Missing Dependency: libgmp.so.3()(64bit) is needed by package php-cli-5.4.27-1.el5.remi.x86_64 (remi)
mysql-server-5.5.37-1.el5.remi.x86_64 from remi has depsolving problems
  --> Missing Dependency: libaio.so.1()(64bit) is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
mysql-server-5.5.37-1.el5.remi.x86_64 from remi has depsolving problems
  --> Missing Dependency: perl(DBI) is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
mysql-server-5.5.37-1.el5.remi.x86_64 from remi has depsolving problems
  --> Missing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
mysql-server-5.5.37-1.el5.remi.x86_64 from remi has depsolving problems
  --> Missing Dependency: perl-DBI is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
php-5.4.27-1.el5.remi.x86_64 from remi has depsolving problems
  --> Missing Dependency: httpd is needed by package php-5.4.27-1.el5.remi.x86_64 (remi)
php-5.4.27-1.el5.remi.x86_64 from remi has depsolving problems
  --> Missing Dependency: httpd-mmn = 20051115 is needed by package php-5.4.27-1.el5.remi.x86_64 (remi)
php-5.4.27-1.el5.remi.x86_64 from remi has depsolving problems
  --> Missing Dependency: libgmp.so.3()(64bit) is needed by package php-5.4.27-1.el5.remi.x86_64 (remi)
mysql-server-5.5.37-1.el5.remi.x86_64 from remi has depsolving problems
  --> Missing Dependency: perl-DBD-MySQL is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: httpd is needed by package php-5.4.27-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: libgmp.so.3()(64bit) is needed by package php-5.4.27-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: httpd-mmn = 20051115 is needed by package php-5.4.27-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: perl-DBI is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: libaio.so.1()(64bit) is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: libgmp.so.3()(64bit) is needed by package php-cli-5.4.27-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: perl-DBD-MySQL is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: perl(DBI) is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
Error: Missing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) is needed by package mysql-server-5.5.37-1.el5.remi.x86_64 (remi)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

我已经有了httpd(我可以运行服务httpd start),每当我尝试安装libaio时,我都会得到这个:

[root@mod2014 rpm-gpg]# yum install --enablerepo=remi,remi-test libaio libaio-devel
Setting up Install Process
No package libaio available.
No package libaio-devel available.
Nothing to do

2 个答案:

答案 0 :(得分:0)

正如您在this网页上看到的那样,您尝试使用的仓库中没有 libaio rpm包。我建议你将this CentOS repo包含到你的/etc/yum.repos.d/目录中或下载所有manually

那么,使用这种过时的RHEL分配的原因是什么?

答案 1 :(得分:0)

好吧,当人们回答"时,这会变得非常老旧。问题是要求为什么你想这样做(即使用"旧的"软件和存储库)。

底线:有许多有效原因 - 同样,通过Yum自动更新和/或RHEL自动更新等原因也是相同的原因。我的情况,例如,Web主机公司让我们保持OLD版本的mysql(5.0.96-community和5.1),PHP(5.2.13)和Apache(2.2.15和2.2.22?) - 他们拒绝改变一些东西(即修改&# 39;弃用mysql_connect命令'以及其他命令)到最新的mysqli和/或PDO格式,所以,当我们接管网站时,代码只能使用 OLD 软件运行。所以,你知道,这样做有充分的理由。

所以,让我们有时间弄清楚什么是mysqli,什么是PDO和"如何"我们是否更改了那些更新(非弃用)产品的软件和代码,我们必须保留旧代码!

但是,要回答原始海报:你可以做到

yum --nogpgcheck localinstall some.rpm --nodeps

然后,通过--nodeps,您将能够绕过"依赖性检查。"