由于我想使用 nginx ,我不想安装 apache2
http://packages.ubuntu.com/lucid-updates/php5-curl
在该链接中,没有对 apache2 的依赖。
root@ubuntu:/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
最佳答案
正如您从链接中看到的那样,该软件包取决于 phpapi-20090626
,这是由 libapache2-mod-php5
之一提供的虚拟包, libapache2-mod-php5filter
, php5-cgi
, 或 php5-cli
.在没有理由不这样做的情况下,它会更喜欢第一个,这取决于 Apache。
要解决此问题,请手动安装提供 phpapi-20090626
的其他软件包之一。 .后两个选项不依赖于 Apache。
apt-get install php5-cli
apt-get install php5-curl
关于ubuntu - (Ubuntu 10.04) 安装 php5 时如何摆脱安装 apache2?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16205684/