简体   繁体   English

在CentOS上安装PHP软件包

[英]PHP package install on CentOS

I want to figure out some issue in my CentOS server. 我想找出我的CentOS服务器中的一些问题。

I have two packages that already installed in my server: php-cli and php-common . 我的服务器中已经安装了两个软件包: php-cliphp-common I see their details when i use the command yum info . 使用命令yum info时,我会看到它们的详细yum info However, when i use the command yum install php-cli , i get an offer to install these two packages, like they are not installed on the server at all. 但是,当我使用命令yum install php-cli ,我得到了安装这两个软件包的报价,就像它们根本没有安装在服务器上一样。 According to the info command, the packages that already installed have the same version of the packages that the server offering to install. 根据info命令,已安装的软件包具有与服务器要安装的软件包相同的版本。

Anyone can explain that? 任何人都可以解释吗?

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]: 

Doesn't look like those packages are installed, otherwise it would say Installed Packages , eg 看起来好像没有安装那些软件包,否则会显示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.

As per man page of 'yum' 按照“ yum”的手册页

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

Thus it is listing only packages, Available in repositories.enter code here 因此,它仅列出包,可在repositories.enter代码中输入

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

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