每当我尝试安装任何软件包时,我都会收到此错误
0 upgraded, 1 newly installed, 0 to remove and 124 not upgraded.
Need to get 19.6 kB of archives.
After this operation, 81.9 kB of additional disk space will be used.
Get:1 http://sa.archive.ubuntu.com/ubuntu/ precise/main finger amd64 0.17-14 [19.6 kB]
Fetched 19.6 kB in 0s (36.6 kB/s)
Selecting previously unselected package finger.
(Reading database ... 75%dpkg: unrecoverable fatal error, aborting:
files list file for package 'libatk-adaptor' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
答案1
答案2
问题在于 libatk-adaptor 软件包中的文件列表已损坏。您可以通过以下方式修复此软件包:
wget http://za.archive.ubuntu.com/ubuntu/pool/main/a/at-spi2-atk/libatk-adaptor_2.4.0-1ubuntu2_amd64.deb
dpkg -c libatk-adaptor_2.4.0-1ubuntu2_amd64.deb | awk '{if ($6 == "./"){ print "/."; } \
else if (substr($6, length($6), 1) == "/")\
{print substr($6, 2, length($6) - 2); } \
else { print substr($6, 2, length($6) - 1);}}'\
> /var/lib/dpkg/info/libatk-adaptor.list
这可以解决眼前的问题,但如果硬盘上的其他文件也损坏了,问题可能会更严重。您必须分别修复每个文件,最终,重新安装可能更快、更简单、更可靠。