0

I am not able to use apt-get to install anything in Ubuntu. Below is the error I get when I run sudo apt-get install :

/bin/sh: 1: /usr/bin/apt-listchanges: not found
E: Sub-process /usr/bin/apt-listchanges --apt || test $? -lt 10 returned an error code (1)
E: Failure running script /usr/bin/apt-listchanges --apt || test $? -lt 10

I have tried sudo apt-get -f install Also tried re-configuring dpkg: sudo dpkg --configure -a And also: sudo apt-get update && sudo apt-get upgrade. All produce the same error. Would appreciate any help / suggestions on this.

  • When did this start happening? i.e., what's the last thing you did to the system before it started happening? – Organic Marble Oct 10 '17 at 14:08
  • Please check ls /var/cache/apt/archives apt-listchanges* to see if there is a .deb package present for list-changes – Charles Green Oct 10 '17 at 14:09
  • I can not tell exactly what triggered this issue. Bumped into it only today. – freerunner Oct 10 '17 at 14:10
  • @CharlesGreen you mean I should do something like this: ls /var/cache/apt/archives | grep apt-listchanges* – freerunner Oct 10 '17 at 14:14
  • Yes - the apt-listchanges package is apparently having issues of some kind - it is not installed by default, but if the deb file is presetn perhaps it could be reinstalled. Alternatively, it could be removed with sudo apt purge apt-listpackages – Charles Green Oct 10 '17 at 14:23
1

Apparently the executable apt-listchanges has gone AWOL on your system. Either of the two following suggestions should help your situation:

Remove the package:

sudo apt purge apt-listchanges

Second possible solution: Download an reinstall the package.

Using this second method may prove problematic if some dependancy has also been removed.

  • A simple apt-get -f --reinstall apt-listchanges should be enough unless Apt breaks before it unpacks (re-)installed packages. In the latter case apt-get download or a manual download followed by dpkg -i are in order as you state. Neither case should require the removal of apt-listchanges; in fact I believe that the removal will cause further issues since Apt itself depends on it. – David Foerster Sep 20 '18 at 12:34
1

I just had the same problem and found this page while troubleshooting. The error message is /bin/sh: 1: /usr/bin/apt-listchanges: not found but /usr/bin/apt-listchanges is actually still there. I noticed that it starts with #!/usr/bin/python3 interpreter, which wasn't present in my system (mine was at /usr/local/bin/python3). I ran sudo ln -s /usr/local/bin/python3.7 /usr/bin/python3 and it worked. NB: Change 3.7 as appropriate.

  • In my case incomplete python3.5 to 3.7 upgrade left a faulty link to python3 – fcm May 30 at 1:13
0

Your problem can be solved if you follow the steps below:

  • Remove apt-listchanges, then download apt-listchanges in another folder.

  • Open your downloaded file and navigate to apt-listchanges as follows;

    usr > bin > apt-listchanges... that is in the folder usr/bin/

  • Use the terminal to replace apt-listchange into the place usr/bin/ folder in your system (the old one you deleted).

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.