我想mediawiki
在 Debian Wheezy 上安装该软件包。mediawiki
依赖于(apache2
OR httpd
)和 MySQL,但我想使用nginx-extras
(它提供httpd
)和 Sqlite (即不是 Apache 也不是 MySQL)。
我先安装了nginx-extras
,就自动安装了httpd
。但是当我尝试安装mediawiki
时
apt-get install mediawiki
它尝试安装各种 Apache 模块。
我如何提醒apt-get
它不应该安装 Apache,因为该包httpd
已经提供了?
我也安装了php5-sqlite
,mediawiki
需要其中之一php5-sqlite
,php5-pgsql
或者php5-mysql
。然而,apt-get
还想安装与MySQL服务器相关的模块。
我试过
apt-get install mediawiki
httpd
在 Ubuntu 系统上,它似乎尊重已经安装的事实。
我是否发现了 Debian 错误,或者我是否缺少 Debian 中的某些配置选项?
答案1
我怀疑 apt 或 mediawiki 控制文件中存在错误。 mediawiki 需要安装 apache2 或 httpd。 APT 更喜欢第一个包,如果它不可用,则使用下一个包,但在这种情况下,下一个是虚拟包 httpd,它也是由 apache2-bin 提供的。我认为这让 apt 感到困惑,它决定安装 apache2 只是为了安全起见。
这可以通过两种方式解决,你可以明确地告诉你你不想安装 apache:
➜ ~ apt-get -s install nginx-extras mediawiki apache2-bin-
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'apache2-bin' is not installed, so not removed
The following extra packages will be installed:
libdbd-mysql-perl libjs-jquery-cookie libjs-jquery-form libjs-jquery-tipsy
libluajit-5.1-2 libluajit-5.1-common libonig2 libqdbm14 mediawiki-classes
mediawiki-extensions-base mysql-client-5.5 mysql-server mysql-server-5.5
mysql-server-core-5.5 nginx-common php-wikidiff2 php5 php5-cgi php5-cli
php5-json php5-mysql php5-readline ssl-cert
Suggested packages:
imagemagick php5-gd mediawiki-extensions-math memcached clamav tinyca
fcgiwrap nginx-doc php-pear openssl-blacklist
The following NEW packages will be installed:
libdbd-mysql-perl libjs-jquery-cookie libjs-jquery-form libjs-jquery-tipsy
libluajit-5.1-2 libluajit-5.1-common libonig2 libqdbm14 mediawiki
mediawiki-classes mediawiki-extensions-base mysql-client-5.5 mysql-server
mysql-server-5.5 mysql-server-core-5.5 nginx-common nginx-extras
php-wikidiff2 php5 php5-cgi php5-cli php5-json php5-mysql php5-readline
ssl-cert
0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded.
Inst libluajit-5.1-common (2.0.3+dfsg-3 Debian:testing [all])
Inst libluajit-5.1-2 (2.0.3+dfsg-3 Debian:testing [amd64])
Inst libonig2 (5.9.5-3.1 Debian:testing [amd64])
Inst libdbd-mysql-perl (4.028-2+b1 Debian:testing [amd64])
Inst mysql-client-5.5 (5.5.40-1 Debian:testing [amd64])
Inst mysql-server-core-5.5 (5.5.40-1 Debian:testing [amd64])
Inst mysql-server-5.5 (5.5.40-1 Debian:testing [amd64])
Inst php5-mysql (5.6.4+dfsg-1 Debian:testing [amd64])
Inst libqdbm14 (1.8.78-5+b1 Debian:testing [amd64])
Inst php5-json (1.3.6-1 Debian:testing [amd64])
Inst php5-cli (5.6.4+dfsg-1 Debian:testing [amd64])
Inst php5-readline (5.6.4+dfsg-1 Debian:testing [amd64])
Inst libjs-jquery-cookie (10-1 Debian:testing [all])
Inst libjs-jquery-form (10-1 Debian:testing [all])
Inst libjs-jquery-tipsy (10-1 Debian:testing [all])
Inst nginx-common (1.6.2-5 Debian:testing [all])
Inst nginx-extras (1.6.2-5 Debian:testing [amd64])
Inst php5-cgi (5.6.4+dfsg-1 Debian:testing [amd64])
Inst php5 (5.6.4+dfsg-1 Debian:testing [all])
Inst mediawiki-classes (1:1.19.20+dfsg-2.2 Debian:testing [all])
Inst mediawiki (1:1.19.20+dfsg-2.2 Debian:testing [all])
Inst mediawiki-extensions-base (3.7 Debian:testing [all])
Inst mysql-server (5.5.40-1 Debian:testing [all])
Inst php-wikidiff2 (1.2+git03ea59f-1 Debian:testing [amd64])
Inst ssl-cert (1.0.35 Debian:testing [all])
Conf libluajit-5.1-common (2.0.3+dfsg-3 Debian:testing [all])
Conf libluajit-5.1-2 (2.0.3+dfsg-3 Debian:testing [amd64])
Conf libonig2 (5.9.5-3.1 Debian:testing [amd64])
Conf libdbd-mysql-perl (4.028-2+b1 Debian:testing [amd64])
Conf mysql-client-5.5 (5.5.40-1 Debian:testing [amd64])
Conf mysql-server-core-5.5 (5.5.40-1 Debian:testing [amd64])
Conf mysql-server-5.5 (5.5.40-1 Debian:testing [amd64])
Conf php5-mysql (5.6.4+dfsg-1 Debian:testing [amd64])
Conf libqdbm14 (1.8.78-5+b1 Debian:testing [amd64])
Conf php5-json (1.3.6-1 Debian:testing [amd64])
Conf php5-cli (5.6.4+dfsg-1 Debian:testing [amd64])
Conf php5-readline (5.6.4+dfsg-1 Debian:testing [amd64])
Conf libjs-jquery-cookie (10-1 Debian:testing [all])
Conf libjs-jquery-form (10-1 Debian:testing [all])
Conf libjs-jquery-tipsy (10-1 Debian:testing [all])
Conf nginx-common (1.6.2-5 Debian:testing [all])
Conf nginx-extras (1.6.2-5 Debian:testing [amd64])
Conf php5-cgi (5.6.4+dfsg-1 Debian:testing [amd64])
Conf php5 (5.6.4+dfsg-1 Debian:testing [all])
Conf mediawiki-classes (1:1.19.20+dfsg-2.2 Debian:testing [all])
Conf mediawiki (1:1.19.20+dfsg-2.2 Debian:testing [all])
Conf mediawiki-extensions-base (3.7 Debian:testing [all])
Conf mysql-server (5.5.40-1 Debian:testing [all])
Conf php-wikidiff2 (1.2+git03ea59f-1 Debian:testing [amd64])
Conf ssl-cert (1.0.35 Debian:testing [all])
或者您可以向 mediawiki 包报告错误,要求删除 apache2 依赖项,因为它已经被列为 httpd 虚拟包的提供者,在这种情况下它应该可以解决问题。
每当您不想安装某个软件包时,您可以-
在不想安装的软件包名称后添加一个减号,apt 就会尊重它,如示例所示。
答案2
apt-get
确实知道httpd
已提供。它必须安装 Apache 来满足某些其他依赖项,可能是php5哪个更喜欢libapache2-mod-php5
.尝试显式安装php5-cgi
orphp5-fpm
来满足php5
的依赖关系。
如果您不明白为什么apt-get
要引入某些包,请使用 Aptitude。它既是一个功能比apt-get
文本模式全屏界面多一点的命令行前端。当拉入软件包进行自动安装时,aptitude 会告诉您原因(在全屏界面中,它毫不费力地可见:g
做出选择后按 并在确认屏幕中突出显示您想知道的软件包)。