2007年5月4日星期五

howto update and install software after delete /var/cache/apt/archives!

several days ago I was too boring to do anything else, so I delete all the files under /var/cache/apt/archives, because it is said all these files are installed software packages, I thought they are useless. Then here comes a big problem, when I type apt-get install * or apt-get update, the terminal will give the hint that could not open lock file /var/cache/apt/archives/lock - open, and unable to lock the download directory,
I do

Code:
sudo mkdir /var/cache/apt/archives
sudo mkdir /var/cache/apt/archives/lock
sudo aptitude update
sudo aptitude upgrade
now I can do

Code:
sudo apt-get update
and


Code:
sudo apt-get dist-upgrade
but, there is still a problem that I can't install any software ,when I do


Code:
sudo apt-get install *
I got the message:

Code:
E:could not open lock file  /var/cache/apt/archives/lock - open(21 is a directory)
E:unable to lock the download directory!
Then I tried this:
Code:
sudo mv /var/cache/apt/archives/lock ~/.
sudo apt-get clean
to remove the lock.and it's finally works. :)
By the way, the best way to delete the downloaded package is:
Code:
sudo apt-get clean 
and you never try to delete any files under filesystem without a backup.

1 评论:

daspeac 说...

I have heard about another way of fix mdf files. Besides, you can visit my blogs at: http://daspeac.livejournal.com/ or http://daspeac.blogspot.com/ where I’m trying to share my experience with regard to data corruption issues.