0

Whilst executing any commands with apt or dpkg I get the following error:

dpkg: error processing package jd-gui (--remove):
 installed jd-gui package pre-removal script subprocess returned error exit status 3
Errors were encountered while processing:
 jd-gui

I have looked this error up and only see answers for other errors such as:

Setting up google-chrome-stable (33.0.1750.152-1) ...
/var/lib/dpkg/info/google-chrome-stable.postinst: 124: /var/lib/dpkg/info/google-chrome-stable.postinst: update-alternatives: not found
dpkg: error processing google-chrome-stable (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up bsnes (0.088-7) ...
/var/lib/dpkg/info/bsnes.postinst: 5: /var/lib/dpkg/info/bsnes.postinst: update-alternatives: not found
dpkg: error processing bsnes (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 google-chrome-stable
 bsnes
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any Ideas of how I would go about fixing this? Oh and I started recieving this error after a package didnt install correctly so I tried deleting it but started getting this error.

  • Help us help you by adding details about the Linux distribution you are using? Do you get error codes when you use the Ubuntu Software center? You can try sudo dpkg --configure -a to reconfigure any things. Then install -f to fix dependencies. Then reboot. – walttheboss Jun 17 at 23:15
  • 1
    as @walttheboss mentioned the combination of sudo dpkg --configure -a and sudo apt install -f should solve it --- – db429 Jun 17 at 23:30
0

Your system missed the update-alternatives binary.

To get it back you have to reinstall dpkg package with:

sudo apt-get install --reinstall dpkg

and then run

sudo dpkg --configure -a
sudo apt install -f
| improve this answer | |
0

I'm not sure if N0rberts answer solved my issue, but I reinstalled ubuntu - but this time xenial instead of bionic. Whilst installing the program I had the same error but this time I got a message saying something along the lines of /etc/init.d/anydesk is not marked as executable. So I decided to chmod +x the file and then I followed the same steps as in N0rberts answer and everything seems to be fine now, so thanks to you for the answer and I hope this helps someone.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.