Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to use apt or apt-get with the error message

I am using WSL on Windows. I am unable to use

apt

or

apt-get

Here is the error message I have when I try to use apt or apt-get.

~$ apt
apt: error while loading shared libraries: libapt-private.so.0.0: cannot open shared object file: No such file or directory

Is there any way I can make it work again? I do not want to re-install WSL just because of this issue.

like image 325
user8809423 Avatar asked Sep 18 '25 13:09

user8809423


1 Answers

Ok at first find out what is your distribution. In my case:

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:        18.04
Codename:       bionic

Then visit and download ".deb" file to your PC accordingly:

Next run command sudo dpkg -i <XYZ>.deb . In my case:

sudo dpkg -i apt_1.6.1_amd64.deb

Then you just need to do:

apt --fix-broken install

Hope that helped ;)

like image 117
Baron Vonfekt Avatar answered Sep 23 '25 13:09

Baron Vonfekt