我在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
我的问题 - 有没有办法一次安装它们?对不起,如果我是这样的菜鸟!
答案 0 :(得分:0)
使用yum
。
基于我在该目录中看到的文件,我猜它是“Remi”构建的镜像。我在http://rpms.famillecollet.com/找到了它们。对于CentOS 6,只需安装their repo RPM,然后安装yum install php-fpm
。
答案 1 :(得分:0)
如果rpm将报告缺少的依赖项并且干净地退出,则yum或apt(对于rpm)这样的工具将尝试满足这些依赖项并隐式地将其提供程序添加到安装目标。
简而言之,你没有使用最好的工具来完成你正在做的工作。如果你需要使用yum或apt来(大多数时候)做正确的事情。