tar: Couldnt remove old file: Is a directory


Forum: Apt-get
Topic: tar: Couldnt remove old file: Is a directory
started by: kudzu

Posted by kudzu on Mar. 14 2004,18:17
if i'm trying to install some packages, I almoust always get this tar error. how can I fix it?


Code Sample

damnsmall@box:~$ sudo su root
root@box:/home/damnsmall# apt-get update
Hit http://ftp.us.debian.org testing/main Packages
Hit http://ftp.us.debian.org testing/main Release
Reading Package Lists... Done
Building Dependency Tree... Done
root@box:/home/damnsmall# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get -f install' to correct these.
Sorry, but the following packages have unmet dependencies:
 apt-utils: Depends: libapt-pkg-libc6.3-5-3.3
E: Unmet dependencies. Try using -f.
root@box:/home/damnsmall# apt-get -f install
Reading Package Lists... Done
Building Dependency Tree... Done
Correcting dependencies... Done
The following extra packages will be installed:
 apt libgcc1 libstdc++5
3 packages upgraded, 0 newly installed, 0 to remove and 98  not upgraded.
Need to get 0B/1273kB of archives. After unpacking 721kB will be used.
Do you want to continue? [Y/n] y
tar: Couldnt remove old file: Is a directory
dpkg-deb: subprocess tar returned error exit status 1
dpkg: error processing /var/cache/apt/archives/libgcc1_1%3a3.3.3-1_i386.deb (--u npack):
subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libgcc1_1%3a3.3.3-1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@box:/home/damnsmall#

Posted by Del on Mar. 15 2004,00:00
root@box:/home/damnsmall# apt-get upgrade

That's probably the problem. You can't upgrade the system, as DSL isn't entirely Debian based. You can apt-get install seperate packages, but an upgrade will always break (in my experience).

Posted by clayton on Mar. 21 2004,19:42
I have apt-get working very well, although still pick and choose to avoid breaking anything, rather then letting it do a full upgrade. Here is a dump of my installation notes on the subject:

Quote
Their are instructions on the web-site for getting the Debian package management software working (it is not there out-of-the-box). The basic process as of this DSL version 0.6.1 is to execute /usr/sbin/dpkg-restore, which installs some kind of dpkg package from the DSL web-site. This version of DSL seems to be based mainly on Debian "testing", so I recommend you point your /etc/sources.list there.

As I soon found out, dpkg is not all there.

This is not a purely Debian system, so lots of things are missing, including things that are considered essential on a normal Debian install. The first thing I found was that after trying to pull down some packages, APT/dpkg invariably became knotted up with obtuse error messages (particularly "tar: Couldnt remove old file: Is a directory") refusing to install anything further. In this state, re-running /usr/sbin/dpkg-restore put Humpty back together temporarily and restored the ability to load and upgrade software. But it kept recurring, and finally when my kernel failed to compile with the last error message pointing toward a dpkg problem, I decided to do something about it. I first tried to re-install dpkg from the Debian server rather then from the DSL server, and was refused. I finally resorted to the risky operation of downloading the package manually and slamming it in place with a dpkg --force-all -i dpkg_1.9.21_i386.deb. After this, not only did the kernel compile, but many of the flaky messages I was getting when dpkg refused to install packages went away. And dpkg/APT/dselect now seem to work just like on a pure Debian system, although I haven't yet been offered an upgrade of anything related to the xserver, which I am sure would be disastrous if accepted.

I succeeded in getting the gcc compiler and kernel source installed with "apt-get install gcc kernel-source-xxxx" but kernel compilation failed with some weird looking messages regarding busybox. (This preceded my dpkg repairs above, so I am not sure if busybox was really causing the breakage.) In DSL, apparently most of your favorite command-line utilities have been replaced by a compact, less capable set of utilities called busybox. I then installed some of the utility packages from the base system to get the real thing. This got rid of all the suspicious-looking busybox warning messages during compilation.

Posted by roberts on Mar. 21 2004,20:56
The next release of DSL will contain an "enhanced" hard drive install option. This option will restore the GNU utilites that were replaced with busybox.  Busybox works fine for the LiveCD  and all the apps therein, thus  helping keep the system small, fast and efficent. But for those of you who use DSL as a traditional distro, whereby you do a traditional hard drive installation, you will have the option of chosing not to use busybox.
Posted by Grim on April 03 2004,04:39
It's a problem with the busybox version of tar. Check < this thread > toward the bottom of the page, right before cbagger gives me a hard time.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.