`
ispring
  • 浏览: 359476 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

apt-get updates broken? problem with MergeList?

阅读更多

Thesd days I've add some sources to the /ect/apt/sources.list, and found I cannot update anymore... this is what i get...

E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.

I've tryed to substitute status with status.old but nothing changes...

my /var/lib/dpkg/status file is as follows...

 

root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:christian
tty:x:5:
disk:x:6:
lp:x:7:cupsys
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:cupsys,christian
fax:x:21:
voice:x:22:
cdrom:x:24:haldaemon,christian
floppy:x:25:haldaemon,christian
tape:x:26:
sudo:x:27:
audio:x:29:christian
dip:x:30:christian
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:christian
sasl:x:45:
plugdev:x:46:haldaemon,christian
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
dhcp:x:101:
syslog:x:102:
klog:x:103:
ssl-cert:x:104:cupsys
crontab:x:105:
ssh:x:106:
messagebus:x:107:
avahi:x:108:
lpadmin:x:109:christian
haldaemon:x:110:
scanner:x:111:cupsys,hplip,christian
slocate:x:112:
gdm:x:113:
christian:x:1000:
admin:x:114:christian
fuse:x:115:christian

 

and finally found some soluation on Internet:

 

Solution 1:

 

Code:
dpkg --configure -a
Code:
apt-get -f install

if that does not work look in

Code:
/var/lib/dpkg/info

The above location stores what are called post-installation (.postinst) and post-removal (.postrm) scripts from deb packages which include them. Sometimes, packagers do not do a good job of packaging software and these scripts (which are NOT present in all debs) error out (during installation or uninstallation) and prevent apt from doing anything further (in terms of installing or uninstalling other packages).
What you need to do then is delete the faulty scripts from the above location and then apt-get remove the package.
That will fix apt.

and then manually go and repir anything else that shows up

 

Solution 2:

 

cd /var/lib/dpkg
mv status status-bad
cp status-old status
apt-get update

 

Problem continue:

 

I needed to remove the lock before I could run the update.

Code:
sudo rm -f /var/lib/dpkg/lock
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics