3

I am trying to install a python version on linux. But I am getting the following error:

Archives directory /var/cache/apt/archives/partial is missing

I have tried to create the file by :

mkdir -p /var/cache/apt/archives/partial

But i am getting the following:

mkdir: cannot create directory ‘/var/cache/apt’: File exists

Edit:

ls -l /var/cache/apt
lrwxrwxrwx 1 root root 32 Apr 17 20:00 /var/cache/apt -> /media/{dir_of_mounted_disc}/apt

How can I solve this?? Thank you!

Raffa
  • 34,963
user357693
  • 33
  • 1
  • 4

1 Answers1

4

It appears that /var/cache/apt is a symlink to a directory ... Which is not normal ... Remove it with:

sudo rm /var/cache/apt

Then recreate the directory structure with:

sudo mkdir -p /var/cache/apt/archives/partial

However:

"I am trying to install a python version on linux"

worries me that this is the least of your problems ... Please be careful not to change/remove system python version ... See for example:

Terminal and other apps suddenly won't open

Raffa
  • 34,963