我无法更新任何软件包,也无法升级,这一切都是在我尝试安装 flashplugin 时发生的,上次尝试升级后会弹出这个窗口

我无法更新任何软件包,也无法升级,这一切都是在我尝试安装 flashplugin 时发生的,上次尝试升级后会弹出这个窗口
sudo apt-get update
sudo: unable to mkdir /var/lib/sudo: No such file or directory
[sudo] password for md: 
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (2: No such file or directory)
E: List of files can't be created as '/var/cache/apt/' is not a directory
E: List of files can't be created as '/var/cache/apt/' is not a directory
E: Could not open lock file /var/lib/dpkg/lock - open (2: No such file or directory)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

答案1

对于缺失的部分:

sudo mkdir -p /var/lib/apt/lists/partial

答案2

我在尝试安装时遇到了同样的问题泰波拉Ubuntu 20.04

每当我运行以下命令时:

# add Typora's repository

sudo add-apt-repository 'deb https://typora.io/linux ./'

我遇到了错误:

E: List directory /var/lib/apt/lists/partial is missing. - Acquire (2: No such file or directory)
E: List of files can't be created as '/var/cache/apt/' is not a directory
E: List of files can't be created as '/var/cache/apt/' is not a directory
E: Could not open lock file /var/lib/dpkg/lock - open (2: No such file or directory)

以下是我解决问题的方法

我断开并重新连接了网络连接,当我再次运行该命令时,它运行正常。

我认为这是我的网络连接问题。

就这样。

我希望这有帮助

相关内容