2017-01-12 133 views
0

我想在我的CentOS服務器上找出一些問題。在CentOS上安裝PHP軟件包

我有兩個包已經安裝在我的服務器上:php-cliphp-common。當我使用命令yum info時,我會看到他們的詳細信息。但是,當我使用命令yum install php-cli時,我收到了安裝這兩個軟件包的報價,就像他們根本沒有安裝在服務器上一樣。根據info命令,已安裝的軟件包具有服務器提供要安裝的軟件包的相同版本。

任何人都可以解釋一下嗎?

yum info php-cli 
Loaded plugins: fastestmirror, security 
Loading mirror speeds from cached hostfile 
* base: centos.syn.co.il 
* epel: mirror.nonstop.co.il 
* extras: centos.syn.co.il 
* rpmforge: apt.sw.be 
* updates: centos.syn.co.il 
Available Packages 
Name  : php-cli 
Arch  : x86_64 
Version  : 5.3.3 
Release  : 48.el6_8 
Size  : 2.2 M 
Repo  : updates 
Summary  : Command-line interface for PHP 
URL   : http://www.php.net/ 
License  : PHP 
Description : The php-cli package contains the command-line interface 
      : executing PHP scripts, /usr/bin/php, and the CGI interface. 

yum info php-common 
Loaded plugins: fastestmirror, security 
Loading mirror speeds from cached hostfile 
* base: centos.syn.co.il 
* epel: mirror.nonstop.co.il 
* extras: centos.syn.co.il 
* rpmforge: apt.sw.be 
* updates: centos.syn.co.il 
Available Packages 
Name  : php-common 
Arch  : x86_64 
Version  : 5.3.3 
Release  : 48.el6_8 
Size  : 530 k 
Repo  : updates 
Summary  : Common files for PHP 
URL   : http://www.php.net/ 
License  : PHP 
Description : The php-common package contains files used by both the php 
      : package and the php-cli package. 

yum install php-cli 
Loaded plugins: fastestmirror, security 
Loading mirror speeds from cached hostfile 
* base: centos.syn.co.il 
* epel: mirror.nonstop.co.il 
* extras: centos.syn.co.il 
* rpmforge: apt.sw.be 
* updates: centos.syn.co.il 
Setting up Install Process 
Resolving Dependencies 
--> Running transaction check 
---> Package php-cli.x86_64 0:5.3.3-48.el6_8 will be installed 
--> Processing Dependency: php-common(x86-64) = 5.3.3-48.el6_8 for package: php-cli-5.3.3-48.el6_8.x86_64 
--> Running transaction check 
---> Package php-common.x86_64 0:5.3.3-48.el6_8 will be installed 
--> Finished Dependency Resolution 

Dependencies Resolved 

============================================================================================================================= 
Package      Arch      Version       Repository     Size 
============================================================================================================================= 
Installing: 
php-cli      x86_64     5.3.3-48.el6_8      updates     2.2 M 
Installing for dependencies: 
php-common     x86_64     5.3.3-48.el6_8      updates     530 k 

Transaction Summary 
============================================================================================================================= 
Install  2 Package(s) 

Total download size: 2.7 M 
Installed size: 9.1 M 
Is this ok [y/N]: 

回答

1

看起來不像那些包安裝,否則它會說Installed Packages,例如

Installed Packages 
Name  : php-cli 
Arch  : x86_64 
Epoch  : 0 
Version  : 7.0.14 
Release  : 1.fc25 
Size  : 13 M 
Repo  : @System 
From repo : updates 
Summary  : Command-line interface for PHP 
URL   : http://www.php.net/ 
License  : PHP and Zend and BSD 
Description : The php-cli package contains the command-line interface 
      : executing PHP scripts, /usr/bin/php, and the CGI interface. 
+0

OK,謝謝你的手冊頁。出於某種原因,我確定'yum info'提供了關於已安裝軟件包的信息。 – Omri

0

按照 '百勝'

"info Is used to list a description and summary information about available packages". 

因此它上市僅包,可在repositories.enter代碼在這裏