7

I've rented a VPS with ubuntu 14.04 LTS and have googled my way to tutorials and basic terminal knowledge. I want to set up a ubunutu desktop so I can also navigate using TightVNC. This whole process unfortunately gets stuck at some error codes. I've searched this and many other sites but I can't find a solution to my specific situation. However I have learned that E: Sub-process /usr/bin/dpkg returned an error code (1) is a generic error code as well as dpkg: error processing package "x" (--configure).

From what I can figure out from the code my install is not completed because 12 packages are unconfigured:

 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

Unfortunately I have no clue how to fix this since I'm a complete beginner. Bellow I will past some more error code example so you guys can better help me out. I've tried to learn/find as much info as I could on my own but I'm really stuck and hope that this community can help me.

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:~#
  • I found this topic http://askubuntu.com/questions/151510/how-can-i-resolve-dpkg-dependency-problems

    And used apt-get remove #followed by the above mentioned 12 packages# and the sudo apt-get update && sudo apt-get upgrade.

    Trying to install only bluez gnome-bluetooth gnome-shell gdm and gnome-user-share are left. However when I sudo apt-get install ubuntu-desktop all the original 12 errors are back.

    – user489207 Jan 04 '16 at 21:38
  • also tried suggestions from this topic but the same errors keep persisting, I'm getting really curious about what's going on here...http://askubuntu.com/questions/103834/how-do-i-force-configuration-of-partially-installed-packages – user489207 Jan 04 '16 at 21:57
  • What's the output of sudo apt-get install -f? – David Foerster Jan 05 '16 at 23:18
  • Please [edit] your question, when you want to add information. Especially file or program output listings (with the help of the {} button in the editor toolbar) are much more readable there and overall it's best to have everything relevant in one place. Also, comments may be deleted for various reasons. – David Foerster Jan 05 '16 at 23:18

3 Answers3

13
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

Worked for me in the end, hopefully someone can use this for future reference!

8
rm /var/lib/dpkg/info/the-package-causing-error

If you have an error like following

dpkg: error processing package jitsi-meet-web-config (--remove): subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing: some-package // this would be different for you E: Sub-process /usr/bin/dpkg returned an error code (1)

and none of user489207's instruction worked for you, then try

rm /var/lib/dpkg/info/some-package*
Sami
  • 236
  • 2
  • 7
0

I too was facing the same problem. Instead of using dpkg I used gdebi.

sudo apt-get install gdebi-core

sudo gdebi dropbox_2015.10.28_amd64.deb
vanadium
  • 88,010