【问题标题】:PHP package install on CentOS在 CentOS 上安装 PHP 包
【发布时间】:2017-05-27 08:42:57
【问题描述】:

我想找出我的 CentOS 服务器中的一些问题。

我的服务器中已经安装了两个软件包: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]: 

【问题讨论】:

    标签: php centos yum


    【解决方案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.
    

    【讨论】:

    • 好的,谢谢。出于某种原因,我确信 yum info 提供了有关已安装软件包的信息。
    【解决方案2】:

    根据“yum”的手册页

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

    因此它只列出包,在存储库中可用。在此处输入代码

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-08
      • 2019-06-22
      • 2013-06-11
      • 2015-03-26
      • 1970-01-01
      • 2016-08-05
      • 2013-10-31
      相关资源
      最近更新 更多