Score:0

Received symbol lookup error after running apt-get

cn flag

After running :

sudo apt-get update
sudo apt-get upgrade

Now I am trying to install any package using apt-get I received this error:

apt-get: symbol lookup error: 
apt-get: undefined symbol:
 _Z15InstallPackagesR9CacheFilebbb, version APTPRIVATE_0.0

I am using ubuntu 20.04.


$ which apt-get
/usr/local/bin/apt-get

$file $(which apt-get)

/usr/local/bin/apt-get: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=dd9a6ba81bc20f363c3246a66e6197ff273b3720, for GNU/Linux 3.2.0, stripped 

$ dd $(which apt-get):

dd: unrecognized operand ‘/usr/local/bin/apt-get’ Try 'dd --help' for more information.

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

Edit:

I was able to solve it by installing the packages from : http://us.archive.ubuntu.com/ubuntu/pool/main/a/apt/

> sudo dpkg --force-all -i <.deb filename>

> sudo apt install -f

> sudo apt-get update --fix-missing

Thank you all.

Hussein Moussa avatar
cn flag
**which apt-get:** `/usr/local/bin/apt-get` **file $(which apt-get):** `/usr/local/bin/apt-get: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=dd9a6ba81bc20f363c3246a66e6197ff273b3720, for GNU/Linux 3.2.0, stripped` **dd $(which apt-get):** `dd: unrecognized operand ‘/usr/local/bin/apt-get’ Try 'dd --help' for more information.` **apt-cache policy apt:** `apt-cache: error while loading shared libraries: libapt-pkg.so.4.12: cannot open shared object file: No such file or directory`
ru flag
Somehow you have a modified apt-get which is NOT system installed, that's why you're getting symbol failures, you don't have the dependent libraries for that `apt-get` on your system. Did yuo make any revisions on your system such as update or manually install newer package versions, or perhaps have a failed upgrade happen?
Score:0
cn flag

I was able to solve it by installing the packages from http://us.archive.ubuntu.com/ubuntu/pool/main/a/apt/

sudo dpkg --force-all -i <.deb filename>
sudo apt install -f
sudo apt-get update --fix-missing
battah avatar
gb flag
I am getting the same problem here. Could you tell me exactly what packages did you installe? All of them? Could you help me with more detailed information? I just did the normal `apt-get upgrade`
Hussein Moussa avatar
cn flag
No, not all of them try to install libstdc or libapt-pkg and then: sudo dpkg --force-all -i <.deb filename>
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.