0

apt-get has broken for me. I tried to re-install it from a .deb, without any luck. I also tried installing aptitude from a .deb. The text below is what I see when running apt-get update. Before trying to install from .deb I saw the 'Bus error' message when running as normal user and sudo, instead of different errors. I'm hoping I can fix this without having to re-install Kubuntu, because the setup afterwards would be my whole day, but that's my next step if no one here knows what to do. I'm running Kubuntu version 16.04.2.

prompt:~$ apt-get update
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
prompt:~$ sudo !!
sudo apt-get update
Bus error (core dumped)
1

Bus error can also mean faulty hardware. Be sure to run memtest. Especially if reinstall doesn't work. And if reinstall does work, check your filesystem and underlying device.

0

Just delete the two lock files. Use:

rm /var/lib/apt/lists/lock

and

rm /var/lib/dpkg/lock

Now run apt again and it will work.

  • That didn't work – Clement Nov 29 '18 at 5:36

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.