有趣的是,每当我尝试在 Ubuntu 11.04 上使用 apt-get 删除软件包时,apt-get 除了删除请求的软件包外,还会尝试安装替代软件包。以下是几个示例:
ubuntu@ip-10-40-64-142:/$ sudo apt-get remove w3m
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
lynx lynx-cur
Suggested packages:
lynx-cur-wrapper
The following packages will be REMOVED:
w3m
The following NEW packages will be installed:
lynx lynx-cur
0 upgraded, 2 newly installed, 1 to remove and 105 not upgraded.
Need to get 1,069 kB of archives.
After this operation, 406 kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
ubuntu@ip-10-40-64-142:/$ sudo apt-get remove firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
epiphany-browser epiphany-browser-data epiphany-gecko evince evince-common gir1.2-clutter-1.0 gir1.2-gstreamer-0.10
gir1.2-json-glib-1.0 gnome-doc-utils gnome-js-common gnome-user-guide gvfs gvfs-backends indicator-application libappindicator1
libavahi-glib1 libavahi-gobject0 libbluetooth3 libcdio-cdda0 libcdio-paranoia0 libcdio10 libclutter-1.0-0 libclutter-1.0-common
libdjvulibre-text libdjvulibre21 libevdocument3 libevview3 libgdu0 libgphoto2-2 libgphoto2-port0 libgvfscommon0 libindicator3
libjson-glib-1.0-0 libnautilus-extension1 libopenobex1 libpoppler-glib6 libseed0 libspectre1 libt1-5 libwebkitgtk-1.0-0
libwebkitgtk-1.0-common obex-data-server policykit-1-gnome python-libxml2 yelp yelp-xsl
Suggested packages:
epiphany-extensions unrar poppler-data nautilus gphoto2 gtkam libspectre1-dbg ttf-dejavu
The following packages will be REMOVED:
firefox firefox-globalmenu
The following NEW packages will be installed:
epiphany-browser epiphany-browser-data epiphany-gecko evince evince-common gir1.2-clutter-1.0 gir1.2-gstreamer-0.10
gir1.2-json-glib-1.0 gnome-doc-utils gnome-js-common gnome-user-guide gvfs gvfs-backends indicator-application libappindicator1
libavahi-glib1 libavahi-gobject0 libbluetooth3 libcdio-cdda0 libcdio-paranoia0 libcdio10 libclutter-1.0-0 libclutter-1.0-common
libdjvulibre-text libdjvulibre21 libevdocument3 libevview3 libgdu0 libgphoto2-2 libgphoto2-port0 libgvfscommon0 libindicator3
libjson-glib-1.0-0 libnautilus-extension1 libopenobex1 libpoppler-glib6 libseed0 libspectre1 libt1-5 libwebkitgtk-1.0-0
libwebkitgtk-1.0-common obex-data-server policykit-1-gnome python-libxml2 yelp yelp-xsl
0 upgraded, 46 newly installed, 2 to remove and 104 not upgraded.
Need to get 21.9 MB of archives.
After this operation, 90.8 MB of additional disk space will be used.
Do you want to continue [Y/n]?
以下是 --version 的输出
ubuntu@ip-10-40-64-142:/$ apt-get --version
apt 0.8.13.2ubuntu4.6 for amd64 compiled on Jun 15 2012 14:55:09
Supported modules:
*Ver: Standard .deb
*Pkg: Debian dpkg interface (Priority 30)
S.L: 'deb' Standard Debian binary tree
S.L: 'deb-src' Standard Debian source tree
Idx: Debian Source Index
Idx: Debian Package Index
Idx: Debian Translation Index
Idx: Debian dpkg status file
是否存在一些模糊的配置或已知的错误导致这种情况?
(我知道 11.04 已经太旧了,但是在这种情况下我没有能力升级 dist。)
答案1
恭喜你找到了问题的根源。未来你需要注意的是,元包也可能导致此问题;例如,如果你安装了“lubuntu”元包并尝试更改/删除组件,许多组件都会自动替换,当你尝试调整已安装的包时,这些组件会让你陷入困境。
答案2
此问题是由软件包引起的update-sun-jre
。删除该软件包可解决问题。这是来自的第三方软件包http://www.duinsoft.nl/packages.php?t=en。