PDA

View Full Version : [SOLVED] apt not working - any advise


crjackson
March 14th, 2008, 01:12 PM
I can't get my updates and I can't seem to repair the package manager. Have a look and tell me what to try next.

charles@Gigabyte-K7:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libxine1-gnome tk8.4
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
3 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
dpkg: parse error, in file `/var/lib/dpkg/available' near line 9:
missing package name
E: Sub-process /usr/bin/dpkg returned an error code (2)
charles@Gigabyte-K7:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libxine1-gnome tk8.4
The following packages will be REMOVED:
libxine1-gnome tk8.4
0 upgraded, 0 newly installed, 2 to remove and 5 not upgraded.
3 not fully installed or removed.
Need to get 0B of archives.
After unpacking 2769kB disk space will be freed.
Do you want to continue [Y/n]? y
dpkg: parse error, in file `/var/lib/dpkg/available' near line 9:
missing package name
E: Sub-process /usr/bin/dpkg returned an error code (2)
charles@Gigabyte-K7:~$ sudo dpkg --configure -a
dpkg: parse error, in file `/var/lib/dpkg/available' near line 9:
missing package name
charles@Gigabyte-K7:~$

jeffus_il
March 14th, 2008, 01:17 PM
First try: sudo aptitude update

crjackson
March 14th, 2008, 01:21 PM
First try: sudo aptitude update

No change. Same issues...

sisco311
March 14th, 2008, 01:22 PM
Is something wrong with the /var/lib/dpkg/available file.

Try to restore the file:
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available

NullHead
March 14th, 2008, 01:24 PM
I would look at /var/lib/dpkg/available and at line 9.

gksudo gedit /var/lib/dpkg/available

crjackson
March 14th, 2008, 01:48 PM
Is something wrong with the /var/lib/dpkg/available file.

Try to restore the file:
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available

The file didn't seem to exist any more. This fixed the problem, thanks.

NullHead
March 14th, 2008, 01:52 PM
A corrupt file perhaps? How does a file that root only access just get removed with out the user knowing??

crjackson
March 14th, 2008, 05:45 PM
A corrupt file perhaps? How does a file that root only access just get removed with out the user knowing??

Probably because my 4 teenage children are the users. I've noticed lately that they have been rebooting from a locked desktop using the reset button. I suspect the file became unreadable during one of these escapades...