今天下午我将系统从 14.04 升级到 16.04,升级完成后报告了一些错误 - Virtual Box 存在依赖性问题,当我尝试使用 Virtual Box 执行任何操作时,这些 insserv: 错误不断出现。其中一个是我创建的虚拟服务(我随后将其删除,不再收到该错误),其他错误与 lpd 和 das-conductor 有关,后者是 datameer 的 /etc/init.d 脚本......我认为我不应该尝试在 ubuntu 上安装它。
更糟糕的是,我失去了耐心,刚刚删除了 etc/init.d/das-conductor 脚本,现在我甚至无法删除/清除该程序(虽然我不确定以前是否能够做到这一点)我尝试用这个脚本替换它:https://www.datameer.com/documentation/current/Starting+Datameer+at+Boot+Time但它不是为 ubuntu 设置的,所以我仍然无法删除 datameer,并且仍然收到 dpkg 错误。我想我的第一个问题是——我还能完全摆脱 datameer 吗?这会有帮助吗?
sudo aptitude purge datameer-apache-2.6.0
The following packages will be REMOVED:
datameer-apache-2.6.0
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 338 MB will be freed.
Do you want to continue? [Y/n/?] y
(Reading database ... 1498119 files and directories currently installed.)
Removing datameer-apache-2.6.0 (5.11.2-2) ...
/var/lib/dpkg/info/datameer-apache-2.6.0.prerm: line 5: /etc/init.d/das-conductor: Permission denied
/var/lib/dpkg/info/datameer-apache-2.6.0.prerm: line 6: chkconfig: command not found
dpkg: error processing package datameer-apache-2.6.0 (--purge): subprocess installed pre-removal script returned error exit status 127
/var/lib/dpkg/info/datameer-apache-2.6.0.postinst: line 7807: chkconfig: command not found
/var/lib/dpkg/info/datameer-apache-2.6.0.postinst: line 7808: chkconfig: command not found
Successfully installed Datameer v5.11.2.
Errors were encountered while processing:
datameer-apache-2.6.0
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
这些都是我在开始摆弄 datameer 之前得到的与安装 virtualbox 相关的指定命令的输出:
sudo apt-get install virtualbox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libgsoap8 libvncserver1 virtualbox-qt
Suggested packages:
vde2 virtualbox-guest-additions-iso
The following NEW packages will be installed:
libgsoap8 libvncserver1 virtualbox virtualbox-qt
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/21.9 MB of archives.
After this operation, 91.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package libgsoap8:amd64.
(Reading database ... 1497994 files and directories currently installed.)
Preparing to unpack .../libgsoap8_2.8.28-1_amd64.deb ...
Unpacking libgsoap8:amd64 (2.8.28-1) ...
Selecting previously unselected package libvncserver1:amd64.
Preparing to unpack .../libvncserver1_0.9.10+dfsg-3build1_amd64.deb ...
Unpacking libvncserver1:amd64 (0.9.10+dfsg-3build1) ...
Selecting previously unselected package virtualbox.
Preparing to unpack .../virtualbox_5.0.24-dfsg-0ubuntu1.16.04.1_amd64.deb ...
Unpacking virtualbox (5.0.24-dfsg-0ubuntu1.16.04.1) ...
Selecting previously unselected package virtualbox-qt.
Preparing to unpack .../virtualbox-qt_5.0.24-dfsg-0ubuntu1.16.04.1_amd64.deb ...
Unpacking virtualbox-qt (5.0.24-dfsg-0ubuntu1.16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for systemd (229-4ubuntu7) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
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.20160701-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Setting up libgsoap8:amd64 (2.8.28-1) ...
Setting up libvncserver1:amd64 (0.9.10+dfsg-3build1) ...
Setting up virtualbox (5.0.24-dfsg-0ubuntu1.16.04.1) ...
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.24-dfsg-0ubuntu1.16.04.1); 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
Processing triggers for libc-bin (2.23-0ubuntu3) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for systemd (229-4ubuntu7) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
virtualbox
virtualbox-qt
E: Sub-process /usr/bin/dpkg returned an error code (1)
然后:
sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up virtualbox (5.0.24-dfsg-0ubuntu1.16.04.1) ...
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.24-dfsg-0ubuntu1.16.04.1); 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.
Errors were encountered while processing:
virtualbox
virtualbox-qt
E: Sub-process /usr/bin/dpkg returned an error code (1)
然后:
sudo apt-get update && sudo apt-get upgrade
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Hit:2 http://ca.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://archive.canonical.com/ubuntu xenial InRelease
Get:4 http://ca.archive.ubuntu.com/ubuntu xenial-updates InRelease [95.7 kB]
Fetched 190 kB in 0s (223 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up virtualbox (5.0.24-dfsg-0ubuntu1.16.04.1) ...
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.24-dfsg-0ubuntu1.16.04.1); 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.
Errors were encountered while processing:
virtualbox
virtualbox-qt
E: Sub-process /usr/bin/dpkg returned an error code (1)
ban@turns:~$ sudo apt-get purge virtualbox
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
virtualbox* virtualbox-qt*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 89.5 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 1498314 files and directories currently installed.)
Removing virtualbox-qt (5.0.24-dfsg-0ubuntu1.16.04.1) ...
Purging configuration files for virtualbox-qt (5.0.24-dfsg-0ubuntu1.16.04.1) ...
Removing virtualbox (5.0.24-dfsg-0ubuntu1.16.04.1) ...
Purging configuration files for virtualbox (5.0.24-dfsg-0ubuntu1.16.04.1) ...
insserv: script lpd: service cups already provided!
insserv: warning: script 'fake_service' missing LSB tags and overrides
insserv: warning: script 'das-conductor' missing LSB tags and overrides
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
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.20160701-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
答案1
使用发布的方法删除 datameerSkippy le Grand Gourou在回答有关删除不正确安装的包的问题时似乎已经起作用了。https://askubuntu.com/a/632523/485705
我注释掉了 /var/lib/dpkg/info/datameer-apache-2.6.0.prerm 的行,并能够使用 apt 删除 datameer,然后删除 /etc/init.d 脚本。虚拟盒仍然存在问题,但我认为这是另一个问题。