dpkg 错误处理包,无法从终端完成安装桌面/GUI

use*_*207 2 vnc package-management command-line apt dpkg

我租了一个带有 ubuntu 14.04 LTS 的 VPS,并在谷歌上搜索了教程和基本的终端知识。我想设置一个 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
Run Code Online (Sandbox Code Playgroud)

不幸的是,我不知道如何解决这个问题,因为我是一个完整的初学者。波纹管我将通过一些更多的错误代码示例,以便你们可以更好地帮助我。我试图自己学习/找到尽可能多的信息,但我真的被困住了,希望这个社区可以帮助我。

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:~#
Run Code Online (Sandbox Code Playgroud)

use*_*207 11

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
Run Code Online (Sandbox Code Playgroud)

最后为我工作,希望有人可以使用它以供将来参考!

  • 须藤 dpkg-reconfigure -a:未知选项:a (2认同)

小智 8

rm /var/lib/dpkg/info/the-package-causing-error
Run Code Online (Sandbox Code Playgroud)

如果您遇到类似以下错误

dpkg:处理包 jitsi-meet-web-config 时出错(--remove):子进程安装的删除后脚本返回错误退出状态 1 处理时遇到错误:some-package // 这对您来说会有所不同 E:Sub-进程 /usr/bin/dpkg 返回错误代码 (1)

并且 user489207 的指令都不适合您,然后尝试

rm /var/lib/dpkg/info/some-package*
Run Code Online (Sandbox Code Playgroud)