Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-23-2006, 04:04 AM   #1
Registered: Jan 2003
Posts: 94

Rep: Reputation: 15
/var/cache/apt/archives/lock error

im running the new version of ubuntu 6.01 i think. I saw that ubuntu was cacheing .deb files after i installed pkgs so like the idiot i am, i rm -rf /var/cache/apt/archives and now when i try to apt-get anything i get this error

apt-get install kolourpaint
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
kdelibs-bin kdelibs4c2 netpbm
Suggested packages:
Recommended packages:
The following NEW packages will be installed:
kdelibs-bin kdelibs4c2 kolourpaint netpbm
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
E: Could not open lock file /var/cache/apt/archives/lock - open (2 No such file or directory)
E: Unable to lock the download directory

not sure how to correct this, but any help would be nice.

Old 06-23-2006, 04:11 AM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,047
Blog Entries: 11

Rep: Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907
Got another instance of apt running, or maybe synaptic or some other GOOEY tool
looking at installing software?

lsof | grep "/var/cache/apt/archives/lock" and see which process holds it.

Old 06-23-2006, 04:17 AM   #3
Senior Member
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
If I understood, the OP has erased the directory, so I think no process has it opened? (the lsof will tell if some process has a nonexistent file open, so do what tinkster said)
I would (as root):
mkdir -p /var/cache/apt/archives/partial
and maybe this
touch /var/cache/apt/archives/lock

Last edited by nx5000; 06-23-2006 at 04:24 AM.
Old 06-23-2006, 07:17 AM   #4
Registered: Jan 2003
Posts: 94

Original Poster
Rep: Reputation: 15
mkdir -p /var/cache/apt/archives/partial allowed me to use apt again. Trying to touch the file only said it wasnt there.

thx a ton


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
remove /var/cache/apt files bhomass Debian 2 02-22-2006 08:52 PM
Error: Caching enabled and local cache: //var/cache/yum/base/primary.xml.gz does... dr_zayus69 Linux - Software 2 07-06-2005 05:32 AM
apt could not lock the cache file abadile Debian 4 06-20-2005 01:35 PM
Where are my .deb packages from /var/cache/apt/archives? bruno buys Debian 3 02-13-2005 08:21 AM
error:cannot get exclusive lock on /var/lib/rmp/packages mateka Linux - Newbie 1 06-26-2004 11:07 PM

All times are GMT -5. The time now is 05:56 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration