2013-04-25 106 views
1

因为我想使用nginx的,我不想安装的Apache2(Ubuntu 10.04)当我安装php5时,如何摆脱安装apache2?

http://packages.ubuntu.com/lucid-updates/php5-curl在链接 有apache2的没有依赖。

[email protected]:/etc/apt/apt.conf.d# apt-get install --no-install-recommends php5-curl 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
The following extra packages will be installed: 
    apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapache2-mod-php5 libaprutil1-dbd-sqlite3 
    libaprutil1-ldap 

Suggested packages: 
    apache2-doc apache2-suexec apache2-suexec-custom php-pear 

Recommended packages: 
    ssl-cert 

The following NEW packages will be installed: 
    apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapache2-mod-php5 libaprutil1-dbd-sqlite3 
    libaprutil1-ldap php5-curl 

0 upgraded, 8 newly installed, 0 to remove and 49 not upgraded. 

Need to get 6,281kB of archives. 
After this operation, 19.3MB of additional disk space will be used. 

很烦人,我无法摆脱安装的Apache2

+0

是否卸载Apache然后不起作用? – Makoto 2013-04-25 03:07:38

回答

2

你可以从你的链接看到,该软件包依赖于phpapi-20090626,这是由libapache2-mod-php5一个,libapache2-mod-php5filter提供的虚拟包,php5-cgiphp5-cli。在没有理由的情况下,它会更喜欢第一个,这取决于Apache。

为了解决这个问题,请手动安装其他软件包之一,提供phpapi-20090626。后两种选择不依赖于Apache。

apt-get install php5-cli 
apt-get install php5-curl 
+0

很好的回答!它是正确的 – 2013-04-25 03:43:34