1

我在 VPS 上运行 centos6。当我写命令时,

# rpm -ivh ftp://195.220.108.108/linux/remi/enterprise/6/test/i386/php-fpm-5.5.4-1.el6.remi.i686.rpmrpm -ivh ftp://195.220.108.108/linux/remi/enterprise/6/test/i386/php-fpm-5.5.4-1.el6.remi.i686.rpm

输出是

# rpm -ivh ftp://195.220.108.108/linux/remi/enterprise/6/test/i386/php-fpm-5.5.4-1.el6.remi.i686.rpm
Retrieving ftp://195.220.108.108/linux/remi/enterprise/6/test/i386/php-fpm-5.5.4-1.el6.remi.i686.rpm
error: Failed dependencies:
        php-common(x86-32) = 5.5.4-1.el6.remi is needed by php-fpm-5.5.4-1.el6.remi.i686

所以我去安装 php-common

# rpm -Uvh ftp://195.220.108.108/linux/remi/enterprise/6/test/i386/php-common-5.5.4-1.el6.remi.i686.rpm

它带有这些依赖项

Retrieving ftp://195.220.108.108/linux/remi/enterprise/6/test/i386/php-common-5.5.4-1.el6.remi.i686.rpm
error: Failed dependencies:
        php-pecl-jsonc(x86-32) is needed by php-common-5.5.4-1.el6.remi.i686
        php-pecl-zip(x86-32) is needed by php-common-5.5.4-1.el6.remi.i686
        php-common(x86-32) = 5.4.20-1.el6.remi is needed by (installed) php-cli-5.4.20-1.el6.remi.i686
        php-common(x86-32) = 5.4.20-1.el6.remi is needed by (installed) php-pdo-5.4.20-1.el6.remi.i686
        php-common(x86-32) = 5.4.20-1.el6.remi is needed by (installed) php-gd-5.4.20-1.el6.remi.i686
        php-common(x86-32) = 5.4.20-1.el6.remi is needed by (installed) php-5.4.20-1.el6.remi.i686
        php-common(x86-32) = 5.4.20-1.el6.remi is needed by (installed) php-fpm-5.4.20-1.el6.remi.i686
        php-common(x86-32) = 5.4.20-1.el6.remi is needed by (installed) php-xml-5.4.20-1.el6.remi.i686
        php-common(x86-32) = 5.4.20-1.el6.remi is needed by (installed) php-mbstring-5.4.20-1.el6.remi.i686

我的问题 - 有没有办法一次安装它们?对不起,如果我这么菜鸟!

4

2 回答 2

0

使用yum.

根据我在该目录中看到的文件,我猜它是“Remi”构建的镜像。我在http://rpms.famillecollet.com/找到了它们。对于 CentOS 6,只需安装他们的 repo RPM,然后yum install php-fpm.

于 2013-10-19T18:51:13.363 回答
0

rpm 是命令行工具,非常基础,不能满足依赖关系。您不能有效地使用它来隐式安装任何东西。

在 rpm 将报告缺少的依赖项并干净退出的地方,yum 或 apt(for rpm) 之类的工具将尝试满足这些依赖项并将它们的提供程序隐式添加到安装目标。

简而言之,你没有使用最好的工具来完成你正在做的工作。如果您需要它来(主要)做正确的事情,请使用 yum 或 apt。

于 2014-10-25T04:20:28.473 回答