0

I accidentally deleted tmp folder. than I was unable to visit browser neither could update/upgrade from terminal. I somehow managed to give 777 permissions to tmp. but When running sudo apt-get upgrade. producing following error.

Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for libreoffice-common (1:4.2.8-0ubuntu3) ...
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the download directory
E: Problem executing scripts DPkg::Post-Invoke 'apt-get clean'
E: Sub-process returned an error code
1
  • The correct permissions are sudo chmod 1777 /tmp.
    – A.B.
    Nov 30, 2015 at 14:02

1 Answer 1

4

To recreate /tmp you need to do the following:

mkdir /tmp 
sudo chmod 1777 /tmp

But

E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)

has nothing to do with /tmp. See Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

2
  • But I am facing this problem since I deleted tmp folder. then IDK how the tmp folder recreated. I have given 777 permissions to tmp. It start allowing me to open browser run commands update/upgrade but giving above mentioned errors. So I guess it is related to tmp folder. Thanks for help btw
    – huzaifa
    Nov 30, 2015 at 15:26
  • But after the tmp/ was created again the problem probably did not go away ;) so follow the link
    – Rinzwind
    Nov 30, 2015 at 17:29

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