Posts: 5
Joined: Sun Sep 02, 2012 4:09 am

Apt package manager isn't working

Sun Sep 02, 2012 6:24 am

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.

Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Apt package manager isn't working

Sun Sep 02, 2012 3:06 pm

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 ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

User avatar
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA
Contact: Website

Re: Apt package manager isn't working

Tue Sep 04, 2012 1:21 am

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.

Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: Apt package manager isn't working

Tue Sep 04, 2012 8:39 am

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.

Forum Moderator
Forum Moderator
Posts: 3439
Joined: Wed Dec 28, 2011 11:45 pm

Re: Apt package manager isn't working

Tue Sep 04, 2012 7:43 pm

I know you say you have tried two different SD cards but this still stinks of a SD card corruption problem to me.

Posts: 5
Joined: Sun Sep 02, 2012 4:09 am

Re: Apt package manager isn't working

Thu Nov 08, 2012 6:08 am

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...

Return to “Raspbian”