LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 11-25-2004, 01:18 PM   #1
zag_zag
LQ Newbie
 
Registered: Aug 2003
Posts: 6

Rep: Reputation: 0
Can't install packages after moving /var


I moved /var to another partition, and now I can't install any packages. The error I get:
Code:
# apt-get install quota
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  quota
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/419kB of archives.
After unpacking 1122kB of additional disk space will be used.
Preconfiguring packages ...
dpkg: error processing /var/cache/apt/archives/quota_3.12-3_i386.deb (--unpack):
 failed to open package info file `/var/lib/dpkg/tmp.ci/control' for reading: No such file or directory
Errors were encountered while processing:
 /var/cache/apt/archives/quota_3.12-3_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I copied the /var directory with cp -a, and everything else seems to work besides that.
 
Old 11-25-2004, 02:03 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,345

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
just plain copying will often break symlinks and all sorts, not a nice thing to do. can you ls that file? the directory it's in? maybe that's a symlink to a different location which has been broken.
 
Old 11-25-2004, 02:49 PM   #3
zag_zag
LQ Newbie
 
Registered: Aug 2003
Posts: 6

Original Poster
Rep: Reputation: 0
As far as I know, cp -a should handle symlinks. I did this before on another system and it worked...

About the file, I can't find it in /var/lib/dpkg (I can ls this directory), but I also can't find it on another (working) Debian system I have. When should this file be generated?

Last edited by zag_zag; 11-25-2004 at 02:50 PM.
 
Old 11-25-2004, 03:35 PM   #4
zag_zag
LQ Newbie
 
Registered: Aug 2003
Posts: 6

Original Poster
Rep: Reputation: 0
Problem solved .
For some reason, dpkg-deb got corrupted during the copy process, so package extracting didn't work.
 
Old 11-26-2004, 05:21 AM   #5
Moloko
Member
 
Registered: Mar 2004
Location: Netherlands
Distribution: Debian
Posts: 729

Rep: Reputation: 30
cpio is a better alternative:
# find . -xdev | cpio -pm /new/location (run from old location)

Even better is doing this on a read-only filesystem to prevent the system from updating or making files.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving /var/adm and /var/lib - why does it hurt? J_Szucs Linux - General 1 09-15-2004 06:46 PM
Moving contents of /var to separate partition TexasDex Linux - Software 2 03-01-2004 08:30 PM
Moving /var to new partition burnpile Slackware 2 12-10-2003 12:33 PM
moving /var to a new hdd freelinuxcpp Linux - Software 4 11-02-2003 02:52 AM
error: cannot get exclusive lock on /var/lib/rpm/Packages error: cannot open Packages inward_eye Linux - Software 3 08-24-2003 03:07 PM


All times are GMT -5. The time now is 11:26 AM.

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