Page 1 of 1

Apt package manager isn't working

Posted: Sun Sep 02, 2012 6:24 am
by falcon1620
Does anyone else have a problem with the package manager installing applications?

For example.
I run

sudo apt-get update
sudo apt-get upgrade

it downloads all the files and asks to proceed, I say yes
It gives up with an error "Package X" contains an empty file dpkage returned error status -2

so then I try to clear all of the cache
sudo apt-get clear
sudo apt-get autoclear

and try to repair
sudo apt-get install -f

Sometimes it will work, sometimes it will return errors and I will break the package manager entirely and have to re-install. I have re-installed my image several times. Trying to install git-core, network-manager-gnome, vlc, and some other packages and update one at a time. Once I got to a point where the error was "files missing for pkg-configure can not continue" and I could not get package manager to work even after trying dpkg -configure -a, or any combination of the usual package manager fixes.

This happens over and over again for each package I try to install. :evil:

My Pi is running on a 5v 2Amp adapter, I have also tried another 5v 1amp adapter. This also happens on my Beagle Board here, but it does not happen on any other architecture running Wheezy like my desktop PC. I have even run the package manager at a friends house, with his adapter and on his network, and tired a Samsung SD card VS my Microcenter brand card.

For some reason I can not reliably install applications on here its very frustrating. I currently have a completely borked apt package manager. Why is aptitude on the ARM architecture not working for me at ALL? This is also happining on my Beagle board. I say apt-get update every time, and apt-get install package, and it will fail 90% of the time.

Re: Apt package manager isn't working

Posted: Sun Sep 02, 2012 3:06 pm
by SirLagz
It would be useful for you to post the entire log on here so we can pick over it.
I can't imagine apt failing in this way to be honest...
Have you tried apt-get -u dist-upgrade ?

Re: Apt package manager isn't working

Posted: Tue Sep 04, 2012 1:21 am
by mpthompson
I don't know what could be wrong with apt on your system. Apt keeps two log files in the directory '/var/log/apt'. Perhaps examining the 'term.log' file in that directory will yield some clues as to what the problem is.

Re: Apt package manager isn't working

Posted: Tue Sep 04, 2012 8:39 am
by bredman
Try the following command to see how much disk space is used
df /

The percentage used is near the right. If this is near 100%, apt-get may be having trouble storing the packages.

Re: Apt package manager isn't working

Posted: Tue Sep 04, 2012 7:43 pm
by plugwash
I know you say you have tried two different SD cards but this still stinks of a SD card corruption problem to me.

Re: Apt package manager isn't working

Posted: Thu Nov 08, 2012 6:08 am
by falcon1620
It's been a while, but I wanted to post an update, basically I had plenty of free space left on both SD cards, and there was nothing to indicate that the problem was. My card was a Microcenter brand class 6 and another one branded PNY. I decided to order a case and an SD card with an image Pre-loaded. Tried out the preloaded image and it worked, so then I wrote the newest Debian image to my new card and have not had any issues since. (Samsung branded coass 6). It's running my Pi completely up to date with Synchronet BBS for a couple of weeks now. I also swapped to a Samsung 1amp adapter that usually charges my tablet which also seemed to help. I think it was a combination of a dud power supply and a few crummy SD cards. :mrgreen: Now my Pi is running great! 3rd time is a charm...