問題

問題

問題

由於「insserv」和 virtualbox 的問題,我嘗試安裝的所有軟體包都無法安裝。這可能是因為 VirtualBox,但我不知道它的哪一部分導致了錯誤。我想知道哪個部分(或者如果我在 Ubuntu 中錯了)導致了問題以及如何修復它。

資訊

我不知道任何硬體資訊是否重要,但可能會。

軟體+作業系統

我在 Ubuntu Xenial (16.04 LTS) 上安裝了 VirtualBox 5.1 和擴充包。如果重要的話,我安裝了帶有 Guest Additions 的 Win XP Pro、FreeDOS 和 Puppy Linux (Racy),所有這些都以~/VirtualBox VMs/.

如果這也很重要的話,透過上述 VBox 設置,我試圖取得適用於 Fedora、Debian、OpenBSD、openSUSE、Kali 和 Linux Mint 的虛擬機器。 (可能還有更多,但我記不清了)

之前我安裝了 VBox 4.3,但在 5.1 中卸載了它。在此之前,我有 Ubuntu Trusty (14.04.4 LTS) 和 VBox 4.3。兩者都只有 Win XP Pro,沒有來賓添加。

硬體

Dell Precision M6300(是的,我很舊),配備NVIDIA G84GLM (Quadro FX 1600M) 卡、Broadcom BCM4312 802.11b/g LP-PHY(無線1395 WLAN 迷你卡),以及一款帶有“處理器微碼”驅動程式的未知卡Intel CPU 的韌體」。

最近的相遇

嘗試安裝 BleachBit 時發生錯誤(約 10 分鐘前):

installArchives() failed: Selecting previously unselected package menu.
(Reading database ... 
(Reading database ... 5%%
(Reading database ... 10%%
(Reading database ... 15%%
(Reading database ... 20%%
(Reading database ... 25%%
(Reading database ... 30%%
(Reading database ... 35%%
(Reading database ... 40%%
(Reading database ... 45%%
(Reading database ... 50%%
(Reading database ... 55%%
(Reading database ... 60%%
(Reading database ... 65%%
(Reading database ... 70%%
(Reading database ... 75%%
(Reading database ... 80%%
(Reading database ... 85%%
(Reading database ... 90%%
(Reading database ... 95%%
(Reading database ... 100%%
(Reading database ... 224061 files and directories currently installed.)
Preparing to unpack .../menu_2.1.47ubuntu1_i386.deb ...
Unpacking menu (2.1.47ubuntu1) ...
Selecting previously unselected package bleachbit.
Preparing to unpack .../bleachbit_1.10-1_all.deb ...
Unpacking bleachbit (1.10-1) ...
Selecting previously unselected package python-notify.
Preparing to unpack .../python-notify_0.1.1-4_i386.deb ...
Unpacking python-notify (0.1.1-4) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Processing triggers for gnome-menus (3.13.3-6ubuntu3) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Setting up virtualbox (5.0.18-dfsg-2build1) ...
insserv: script virtualbox: service vboxdrv already provided!
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package virtualbox (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of virtualbox-qt:
 virtualbox-qt depends on virtualbox (= 5.0.18-dfsg-2build1); however:
  Package virtualbox is not configured yet.
  Package virtualbox-4.3 which provides virtualbox is not installed.

dpkg: error processing package virtualbox-qt (--configure):
  dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up menu (2.1.47ubuntu1) ...
Setting up python-notify (0.1.1-4) ...
Processing triggers for menu (2.1.47ubuntu1) ...
Setting up bleachbit (1.10-1) ...
Errors were encountered while processing:
 virtualbox
 virtualbox-qt
Setting up virtualbox (5.0.18-dfsg-2build1) ...
insserv: script virtualbox: service vboxdrv already provided!
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package virtualbox (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of virtualbox-qt:
 virtualbox-qt depends on virtualbox (= 5.0.18-dfsg-2build1); however:
  Package virtualbox is not configured yet.
  Package virtualbox-4.3 which provides virtualbox is not installed.

dpkg: error processing package virtualbox-qt (--configure):
 dependency problems - leaving unconfigured

對於我未從軟體中心或安裝 DVD(我僅用於獲取 Broadcom 驅動程式)獲取的所有內容,此問題仍然存在。

/etc/init.d/vboxdrv腳本

以下是接近開頭的摘錄:

# Provides:       vboxdrv
# Required-Start: $syslog
# Required-Stop:
# Default-Start:  2 3 4 5
# Default-Stop:   0 1 6
# Short-Description: VirtualBox Linux kernel module
#### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin:$PATH
DEVICE=/dev/vboxdrv
LOG="/var/log/vbox-install.log"
VERSION=4.3.38
MODPROBE=/sbin/modprobe

答案1

這裡的日誌顯示BleachBit安裝成功:

Setting up bleachbit (1.10-1) ...

Dpkg 試圖告訴您 virtualbox 軟體包已安裝,但未完全完成設定階段。可能是 /var/lib/dpkg/info 中 virtualbox 的 postinst 腳本。主要失敗在這裡:

insserv: script virtualbox: service vboxdrv already provided!

因此,腳本嘗試透過查看 /etc/init.d 腳本來註冊 vboxdrv 以在啟動時啟動。我猜測升級過程中出了問題並留下了一些檔案。

你可以看看這樣的資源https://wiki.debian.org/LSBInitScripts/DependencyBasedBoot並嘗試進一步調試。我敢打賭 /etc/init.d 中有不只一個腳本包含「Provides: vboxdrv」標頭。您可以在 /etc/init.d 中找到該內容並找出哪一個是舊的。

您也可以嘗試清除 virtualbox 軟體包並重新安裝。

相關內容