1

i tried running dpkg manually,then this error accrued 'dpkg: error: parsing file '/var/lib/dpkg/status' near line 0: field name 'ELF' must be followed by colon'; this is my problem.

1 Answer 1

0

The /var/lib/dpkg/status should be pure text...

$ head -n 5 /var/lib/dpkg/status 
Package: accountsservice
Status: install ok installed
Priority: optional
Section: adminsome
Installed-Size: 452

The word ELF makes me think your file is corrupted or replaced (with a executable binary file)...

$ od -Ax -t x1z -w16  `which head` | head -n 5
000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00  >.ELF............<
000010 03 00 3e 00 01 00 00 00 10 37 00 00 00 00 00 00  >..>......7......<
000020 40 00 00 00 00 00 00 00 f8 b1 00 00 00 00 00 00  >@...............<
000030 00 00 00 00 40 00 38 00 0d 00 40 00 1e 00 1d 00  >....@.8...@.....<
000040 06 00 00 00 04 00 00 00 40 00 00 00 00 00 00 00  >........@.......<

^^^- A hexdump of the head binary file, as expected it has ELF in the first few bytes.

Try $ file /var/lib/dpkg/status it should say
/var/lib/dpkg/status: UTF-8 Unicode text, with very long line
... not anything else...

An executable file:

$ file $(which head)
/usr/bin/head: ELF 64-bit LSB shared object,  ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.