dpkg is messing up for me. Help!
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
E: _cache->open() failed, please report. Thats the error i get. I tried all that dpkg --configure -a and i put sudo in front of it but it still won't work. Help. |
What distro are you running?
And what were you doing that caused the issue? You can try parsing the output of dpkg --get-selections and see if something is listed as "broken" or "partially installed". |
I have ubuntu 8.1
I got this for dpkg selections. izese@izese-desktop:~$ dpkg --get-selections dpkg: parse error, in file `/var/lib/dpkg/updates/0001' near line 1: newline in field name `padding' |
Try using "sudo dpkg --get-selections".
And what were you doing when things went bad? |
I tried to update some programs.
|
got this.
izese@izese-desktop:~$ sudo dpkg --get-selections dpkg: parse error, in file `/var/lib/dpkg/updates/0001' near line 1: newline in field name `padding' izese@izese-desktop:~$ |
What is the output of df -h.
|
And what is the output of ls -al /var/lib/dpkg/updates?
|
I googled around and found a possible solution for you. You can try deleting the update that has been downloaded, then run dpkg. So in order you can try (at your own risk, of course)
Code:
sudo rm /var/lib/dpkg/updates/0001 |
I had a similar problem recently on a live CD when I tried to do an apt-get dist-upgrade, but ran out of space.
It looked like the numbered file in /var/lib/dpkg/updates/ was truncated due to a lack of disk space, and this prevented apt-get or dpkg from working. I was able to clear the problem by removing this file, then running Code:
apt-get clean; dpkg --reconfigure -a |
Quote:
How do i delete/var/lib/dpkg/updates/? izese@izese-desktop:~$ ls -al /var/lib/dpkg/updates total 76 drwxr-xr-x 2 root root 4096 2009-01-09 17:02 . drwxr-xr-x 8 root root 4096 2008-12-17 18:57 .. -rw-r--r-- 1 root root 1144 2008-12-17 18:57 0000 -rw-r--r-- 1 root root 1143 2008-12-17 18:57 0002 -rw-r--r-- 1 root root 1143 2008-12-17 18:57 0003 -rw-r--r-- 1 root root 1137 2008-12-17 18:57 0004 -rw-r--r-- 1 root root 1130 2008-12-17 18:57 0005 -rw-r--r-- 1 root root 1085 2008-12-17 18:57 0006 -rw-r--r-- 1 root root 1078 2008-12-17 18:57 0007 -rw-r--r-- 1 root root 1084 2008-12-17 18:57 0008 -rw-r--r-- 1 root root 1084 2008-12-17 18:57 0009 -rw-r--r-- 1 root root 1078 2008-12-17 18:57 0010 -rw-r--r-- 1 root root 1071 2008-12-17 18:57 0011 -rw-r--r-- 1 root root 1036 2008-12-17 18:57 0012 -rw-r--r-- 1 root root 1029 2008-12-17 18:57 0013 -rw-r--r-- 1 root root 1035 2008-12-17 18:57 0014 -rw-r--r-- 1 root root 1035 2008-12-17 18:57 0015 -rw-r--r-- 1 root root 1029 2008-12-17 18:57 0016 -rw-r--r-- 1 root root 1022 2008-12-17 18:57 tmp.i izese@izese-desktop:~$ df -h. df: invalid option -- '.' Try `df --help' for more information. izese@izese-desktop:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda6 118G 23G 90G 21% / tmpfs 441M 0 441M 0% /lib/init/rw varrun 441M 216K 441M 1% /var/run varlock 441M 0 441M 0% /var/lock udev 441M 2.7M 439M 1% /dev tmpfs 441M 692K 441M 1% /dev/shm lrm 441M 2.0M 439M 1% /lib/modules/2.6.27-7-generic/volatile |
help
|
Looks like you ran the first command and removed 0001. Did you then run dpkg --reconfigure -a?
|
Quote:
|
Yes.
|
Quote:
dpkg: unknown option --reconfigure Type dpkg --help for help about installing and deinstalling packages[*]; Use `dselect' or `aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files; Type dpkg --license for copyright license and lack of warranty (GNU GPL)[*]. Options marked[*] produce a lot of output - pipe it through `less' or `more' ! What should i do now? |
Sorry, my fault. I meant dpkg --configure -a
|
Quote:
izese@izese-desktop:~$ dpkg --configure -a dpkg: requested operation requires superuser privilege izese@izese-desktop:~$ sudo dpkg --configure -a dpkg: parse error, in file `/var/lib/dpkg/updates/0002' near line 1: field name ` izese@izese-desktop:~$ |
Okay, so now sudo rm /var/lib/dpkg/updates/0002 and then try the dpkg command again.
Basically, what I think happened was one of the updates got borked. So just keep deleting them one by one until the dpkg command works correctly. |
Quote:
izese@izese-desktop:~$ sudo rm /var/lib/dpkg/updates/0002 rm: cannot remove `/var/lib/dpkg/updates/0002': No such file or directory izese@izese-desktop:~$ sudo rm /var/lib/dpkg/updates/0002 It must be deleted so how can i delete the others or is there an alternative to Dpkg? |
What is the output of ls -al /var/lib/dpkg/updates?
dpkg is the guts of the package management system. You won't be able to install any software until you resolve this situation. Did you try running sudo dpkg --configure -a again? |
I fixed it for me
My fix was deleting some more:
Code:
sudo rm /var/lib/dpkg/updates/00** |
All times are GMT -5. The time now is 07:29 PM. |