5

when I try to update and type:

sudo apt-get update

I get this error

E: Problem executing scripts APT::Update::Post-Invoke-Success 'test -x /usr/bin/apt-show-versions || exit 0 ; apt-show-versions -i'
E: Sub-process returned an error code
3
  • What do you get if you run sudo apt-show-versions -i? Are you sure you need apt-show-versions? Nov 23, 2012 at 19:19
  • not a reference at /usr/bin/apt-show-versions line 218
    – Mj125
    Nov 23, 2012 at 19:43
  • I change my repositories, but it doewsn't help
    – Mj125
    Nov 23, 2012 at 19:55

4 Answers 4

10

That sounds like a bug in apt-show-versions. If you don't really need apt-show-versions you may just remove it, for example by running

sudo apt-get purge apt-show-versions

If you don't know if you need it you quite likely don't need it.

If you need the program you could at least remove the file

/etc/apt/apt.conf.d/20apt-show-versions

and file a bug report.

1
  • works for me on ubuntu 14.04
    – realhu
    Dec 9, 2015 at 16:42
4

I know this thread is old, but because people find it when searching for help I thought I would add another answer. Memory. If you are out of memory you will get this error. You can fix this quickly by adding swap space if you don't already have any.

1

I just got the same error. I am running ubuntu 14.04 server.

I determined it was because I had too many old packages hogging space. I have been running automatic updates for over a year straight. I guess it isn't so automatic!

After running dpkg --configure -a and apt-get clean, I ran apt-get purge apt-show-versions and I am pretty sure that apt-get autoremove got me back in business.

It took a few attempts to finish the job -- autoremove got stuck a few times. Each time, some files would be removed and then it would crap out. It went from 4gb down to 700MB and finally 70MB.

During the process I was informed that my linux image was unstable. It was the latest version so I assume that it was related to the original problem.

After running apt-get update && apt-get upgrade everything seems to be fine

I cleared the clutter out of /boot for good measure.

Cheers!

0
-1

I have to say I'm a beginner of Ubuntu but try to follow this guide:

Updating problems in 12.04

Antonio says that it worked! Let's hope it will work for you too, even though the problem maybe isn't the same!

You must log in to answer this question.

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