【问题标题】:unable to use apt or apt-get with the error message无法使用带有错误消息的 apt 或 apt-get
【发布时间】:2020-01-02 08:58:56
【问题描述】:

我在 Windows 上使用 WSL。我无法使用

apt

apt-get

这是我尝试使用 apt 或 apt-get 时收到的错误消息。

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

有什么办法可以让它再次工作吗?我不想仅仅因为这个问题而重新安装 WSL。

【问题讨论】:

  • 我也突然遇到同样的错误,Windows 10 上的 WSL。不知道发生了什么

标签: ubuntu-18.04 windows-subsystem-for-linux apt-get


【解决方案1】:

首先确定您的发行版是什么。 就我而言:

lsb_release -a

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

然后visit 并相应地将“.deb”文件下载到您的 PC:

下一个运行命令sudo dpkg -i <XYZ>.deb。就我而言:

sudo dpkg -i apt_1.6.1_amd64.deb

那么你只需要这样做:

apt --fix-broken install

希望有所帮助;)

【讨论】:

    猜你喜欢
    • 2020-12-22
    • 1970-01-01
    • 1970-01-01
    • 2023-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-02
    相关资源
    最近更新 更多