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.

2
  • 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. Jun 17, 2020 at 23:15
  • 1
    as @walttheboss mentioned the combination of sudo dpkg --configure -a and sudo apt install -f should solve it ---
    – d1bro
    Jun 17, 2020 at 23:30

2 Answers 2

1

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
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.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .