I am very new to linux. When trying to install any software with apt, i get the error

apt-get: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory

apt error

I think the problem is that one of apt dependencies libapt-pkg.so.4.12 doesn't exist.

When i type dpkg -l i can see that i have libapt-pkg5.0:amd64. Is this a newer version of what apt needs?

How can i make apt to use the right package version?


  • 1
    What version of Ubuntu you are using? – Manish Kumar Bisht Oct 28 '17 at 6:28
  • I am using Ubuntu 17.10 – SomeGuyFortune Oct 28 '17 at 6:31
  • Really sorry, I am not expert in this matter. However I tried to look into the matter and I found that libapt-pkg.so.4.12 is a package for trusty i.e Ubuntu 14.04. For Ubuntu 17.10 libapt-pkg5.0 is the right package. Can you tell us when this problem started to appear? That is to say, do you know what caused the apt to break down? – Manish Kumar Bisht Oct 28 '17 at 6:51
  • I was trying to install chrome using some instructions i found online. Somewhere along the line, i must have broken apt. Can i somehow remove the apt package and re-install it? Or somehow reset the OS? – SomeGuyFortune Oct 28 '17 at 6:57
  • @SomeGuyFortune if you try that you won't like what you see! And where are those instructions for chrome you speak of? – George Udosen Oct 28 '17 at 7:03

Your Answer

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

Browse other questions tagged or ask your own question.