dpkg error processing packages, cannot complete install desktop/GUI from terminal
Solution 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
Worked for me in the end, hopefully someone can use this for future reference!
Solution 2
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*
Related videos on Youtube
user489207
Updated on September 18, 2022Comments
-
user489207 over 1 year
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 asdpkg: 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:~#
-
user489207 over 8 yearsI found this topic askubuntu.com/questions/151510/… And used
apt-get remove #followed by the above mentioned 12 packages#
and thesudo 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 Isudo apt-get install ubuntu-desktop
all the original 12 errors are back. -
user489207 over 8 yearsalso tried suggestions from this topic but the same errors keep persisting, I'm getting really curious about what's going on here...askubuntu.com/questions/103834/…
-
David Foerster over 8 yearsWhat's the output of
sudo apt-get install -f
? -
David Foerster over 8 yearsPlease 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.
-
-
Matias Haeussler over 5 yearssudo dpkg-reconfigure -a: Unknown option: a