0

Why am I getting an error after running the following commands?

sudo rm -r /tmp
sudo rm -r /var/tmp
sudo rm -r /var/log

sudo mkdir /tmp
sudo mkdir /var/tmp
sudo mkdir /var/log
sudo apt update

Error message:

Couldn't create temporary file /tmp/apt.conf.RFX4BR for passing config to apt-key
Couldn't create temporary file /tmp/apt.conf.GuJXFx for passing config to apt-key
(truncated)
0

1 Answer 1

1

/tmp/ needs to be

drwxrwxrwt  20 root     root      4096 jun  5 21:03 tmp

/var/tmp and /var/log need to be:

drwxrwxr-x 13 root syslog   4096 jun  4 00:00 log
drwxrwxrwt 13 root root     4096 jun  5 04:09 tmp

Please adjust those to the above using sudo chmod 1777 and sudo chown root:root for the two tmp's and sudo chown root:syslog for "log". And check if it then matches what it liste here using ls / and ls /var/.

0

You must log in to answer this question.

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