8
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?

2 Answers 2

9

For the missing partial:

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

I had this same issue when trying to install an Typora on Ubuntu 20.04.

Whenever I run the command below:

# add Typora's repository

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

I was running into the error:

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)

Here's how I solved it:

I disconnected and reconnected my network connection, and when I ran the command again, it worked fine.

I think it was an issue with my network connectivity.

That's all.

I hope this helps

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .