我租了一个装有 ubuntu 14.04 LTS 的 VPS,并在 Google 上搜索了教程和基本终端知识。我想设置一个 ubunutu 桌面,这样我也可以使用 TightVNC 进行导航。不幸的是,整个过程卡在某些错误代码上。我搜索了这个网站和许多其他网站,但找不到针对我的具体情况的解决方案。然而,我了解到这E: Sub-process /usr/bin/dpkg returned an error code (1)
是一个通用错误代码,也是dpkg: error processing package "x" (--configure)
。
从代码中我可以得出我的安装没有完成,因为有 12 个包未配置:
bluez
bluez-alsa:amd64
gnome-bluetooth
indicator-bluetooth
unity-control-center
gnome-shell
gdm
gnome-user-share
ubuntu-desktop
unity-control-center-signon
webaccounts-extension-common
xul-ext-webaccounts
不幸的是,由于我是一个完全的初学者,我不知道如何解决这个问题。下面我将发布更多错误代码示例,以便你们可以更好地帮助我。我尝试自己学习/查找尽可能多的信息,但我真的陷入困境,希望这个社区可以帮助我。
root@h2511510:~#
sudo apt-get install ubuntu-desktop
Reading package lists... Done
Building dependency tree
Reading state information... Done
ubuntu-desktop is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
12 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [J/n] J
Setting up bluez (4.101-0ubuntu13.1) ...
start: Job failed to start
invoke-rc.d: initscript bluetooth, action "start" failed.
dpkg: error processing package bluez (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of bluez-alsa:amd64:
bluez-alsa:amd64 depends on bluez; however:
Package bluez is not configured yet.
dpkg: error processing package bluez-alsa:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-bluetooth:
gnome-bluetooth depends on bluez (>= 4.36); however:
Package bluez is not configured yet.
# ETC ETC ETC, same logs for all 12 processes #
Errors were encountered while processing:
bluez
bluez-alsa:amd64
gnome-bluetooth
indicator-bluetooth
unity-control-center
gnome-shell
gdm
gnome-user-share
ubuntu-desktop
unity-control-center-signon
webaccounts-extension-common
xul-ext-webaccounts
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@h2511510:~#
答案1
sudo apt-get autoremove
sudo apt-get --purge remove && sudo apt-get autoclean
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo dpkg-reconfigure -a
sudo dpkg --configure -a
最终对我有用,希望有人可以将其用作将来的参考!
答案2
rm /var/lib/dpkg/info/the-package-causing-error
如果你遇到如下错误
dpkg:错误处理软件包 jitsi-meet-web-config (--remove):安装的子进程删除后脚本返回错误退出状态 1 处理时遇到错误:some-package //这对您来说会有所不同 E:子进程 /usr/bin/dpkg 返回错误代码 (1)
并且 user489207 的指示都不适合您,请尝试
rm /var/lib/dpkg/info/some-package*
答案3
我也遇到了同样的问题。我没有使用 dpkg,而是使用了格德比。
sudo apt-get install gdebi-core
sudo gdebi dropbox_2015.10.28_amd64.deb