简体   繁体   English

在CentOS问题上安装PHP

[英]Install PHP On CentOS Issues

I'm having issues installing PHP on Centos using yum install php 我在使用yum install php在Centos上安装PHP时遇到问题

Could someone help me get it working if possible? 如果可以的话,有人可以帮我使它工作吗?

Here's what it's saying: 这就是它的意思:

login as: root
root@****************'s password:
Last login: Wed Jan 14 06:21:17 2015 from **************
[root@linuxvps ~]# yum install php
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.coreix.net
 * extras: centos.serverspace.co.uk
 * updates: centos.hyve.com
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package php.x86_64 0:5.3.3-40.el6_6 will be installed
--> Processing Dependency: php-cli(x86-64) = 5.3.3-40.el6_6 for package: php-5.3.3-40.el6_6.x86_64
--> Finished Dependency Resolution
Error: Package: php-5.3.3-40.el6_6.x86_64 (updates)
           Requires: php-cli(x86-64) = 5.3.3-40.el6_6
           Installed: php-cli-5.4.36-1.el6.remi.x86_64 (@remi)
               php-cli(x86-64) = 5.4.36-1.el6.remi
           Available: php-cli-5.3.3-38.el6.x86_64 (base)
               php-cli(x86-64) = 5.3.3-38.el6
           Available: php-cli-5.3.3-40.el6_6.x86_64 (updates)
               php-cli(x86-64) = 5.3.3-40.el6_6
 You could try using --skip-broken to work around the problem
** Found 13 pre-existing rpmdb problem(s), 'yum check' output follows:
mysql-5.5.41-1.el6.remi.x86_64 has missing requires of real-mysql-libs(x86-64) = ('0', '5.5.41', '1.el6.remi')
mysql-server-5.1.73-3.el6_5.x86_64 has missing requires of mysql = ('0', '5.1.73', '3.el6_5')
php-bcmath-5.4.36-1.el6.remi.x86_64 has missing requires of php-common(x86-64) = ('0', '5.4.36', '1.el6.remi')
php-cli-5.4.36-1.el6.remi.x86_64 has missing requires of php-common(x86-64) = ('0', '5.4.36', '1.el6.remi')
php-gd-5.4.36-1.el6.remi.x86_64 has missing requires of php-common(x86-64) = ('0', '5.4.36', '1.el6.remi')
php-mbstring-5.4.36-1.el6.remi.x86_64 has missing requires of php-common(x86-64) = ('0', '5.4.36', '1.el6.remi')
php-mcrypt-5.4.36-1.el6.remi.x86_64 has missing requires of php-common(x86-64) = ('0', '5.4.36', '1.el6.remi')
php-mysql-5.4.36-1.el6.remi.x86_64 has missing requires of libmysqlclient.so.18()(64bit)
php-mysql-5.4.36-1.el6.remi.x86_64 has missing requires of libmysqlclient.so.18(libmysqlclient_16)(64bit)
php-mysql-5.4.36-1.el6.remi.x86_64 has missing requires of libmysqlclient.so.18(libmysqlclient_18)(64bit)
php-pdo-5.4.36-1.el6.remi.x86_64 has missing requires of php-common(x86-64) = ('0', '5.4.36', '1.el6.remi')
php-tidy-5.4.36-1.el6.remi.x86_64 has missing requires of php-common(x86-64) = ('0', '5.4.36', '1.el6.remi')
php-xml-5.4.36-1.el6.remi.x86_64 has missing requires of php-common(x86-64) = ('0', '5.4.36', '1.el6.remi')
[root@linuxvps ~]#

php is a meta package. php是一个meta包。 It installs all needed php packages, like php-common, php-cli, php-mysql and so on. 它会安装所有需要的php软件包,例如php-common,php-cli,php-mysql等。 But you added the remi repository to your centos (usually to install a higher php version than your centos provides), and remi does not provide this php meta package. 但是您将remi存储库添加到了centos(通常是安装比centos提供的更高的php版本),而remi不提供此php meta软件包。

So when you try to install php, your centos tries to install the original packages, which interfere with the remi ones you already installed. 因此,当您尝试安装php时,您的centos会尝试安装原始软件包,这会干扰已经安装的remi软件包。

Solution: Dont install the php meta package, install the remi single packages. 解决方案:不要安装php meta软件包,请安装remi单个软件包。 Since they are already installed, i dont know what you even try to do, because you have php already installed. 由于它们已经安装,所以我什至不知道您要尝试做什么,因为您已经安装了php。

OR 要么

Remove remi repository and do a yum update. 删除remi存储库并进行yum更新。

As this error message outputs. 作为此错误消息输出。 PHP requires installation of some Dependency Packages. PHP需要安装某些依赖项软件包。

I see you need to include php-cli in you installation: 我看到您需要在安装中包括php-cli

Use: 采用:

yum install php php-cli

or 要么

yum install php*

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM