(类似于问题在 Debian 上卸载默认的 VBoxGuestAdditions但是 Ubuntu 安装,并且那里的解决方案对我不起作用?)
事实上,问题似乎出在 dpkg/apt-get 上,而不是 virtualbox 或其 Linux 来宾添加上:
host:/media/VBOXADDITIONS_4.2.10_84104$ dpkg -l | grep virtualbox
rc virtualbox-guest-utils 4.1.12-dfsg-2ubuntu0.2 x86 virtualization solution - non-X11 guest utilities
rc virtualbox-guest-x11 4.1.12-dfsg-2ubuntu0.2 x86 virtualization solution - X11 guest utilities
host:/media/VBOXADDITIONS_4.2.10_84104$ sudo apt-get remove virtualbox-guest-utils virtualbox-guest-x11
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package virtualbox-guest-utils is not installed, so not removed
Package virtualbox-guest-x11 is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.
host:/media/VBOXADDITIONS_4.2.10_84104$ sudo sh ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.10 Guest Additions for Linux..........
VirtualBox Guest Additions installer
You appear to have a version of the VBoxGuestAdditions software
on your system which was installed from a different source or using a
different type of installer. If you installed it from a package from your
Linux distribution or if it is a default part of the system then we strongly
recommend that you cancel this installation and remove it properly before
installing this version. If this is simply an older or a damaged
installation you may safely proceed.
Do you wish to continue anyway? [yes or no]
no
Cancelling installation.
所以 dpkg 看到 virtualbox-guest-utils 和 virtualbox-guest-x11 但 apt-get 无法删除它们?!
答案1
rc virtualbox-guest-utils 4.1.12-dfsg-2ubuntu0.2
此输出中的前两个标志告诉您到底发生了什么:
“r”表示包处于删除状态。从技术上来说它仍然安装着,但实际上大部分已经消失了。
“c”表示配置文件仍然安装。
man dpkg-query
如果您有兴趣,请阅读以获取更多信息。
这种状态 (rc) 很常见 - 几乎每次您删除带有配置文件的包时,它最终都会处于这种状态。
要修复此问题,请使用或--purge
选项来清理这些条目。dpkg
apt-get remove