Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
apt apt-transport-https apt-utils dpkg libapt-inst2.0 libapt-pkg5.0 ntpdate
oracle-java8-installer oracle-java8-set-default thermald
10 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/4,389 kB of archives.
After this operation, 8,192 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
files list file for package 'linux-generic' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
Run Code Online (Sandbox Code Playgroud)
我已经尝试过通常的东西,例如:
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade
Run Code Online (Sandbox Code Playgroud)
任何帮助,谢谢!
cat -net /var/lib/dpkg/info/linux-generic.list
1 ^LbM-BM-^FRq^MU^Evalueq^NK^HubU^Mcertificationq^ONU^Hoverviewq^PNU$
2 updated_atq^QNU^Vavailable_translationsq^RNU^Dyearq^SMM-CM-^]^GU^Fimagesq^TNU^Bidq^UNU^Ipaused_atq^VNU^Eindex
Run Code Online (Sandbox Code Playgroud)
小智 27
我遇到了以下错误的类似问题:
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libboost-regex1.55.0:armhf' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
Run Code Online (Sandbox Code Playgroud)
但是,该文件夹/var/lib/dpkg/info/linux在我的系统上不存在,如上一篇文章所述。(我在 Raspberry pi 3 上运行 Raspbian)
我移动了以下文件:
/var/lib/dpkg/info/libboost-regex1.55.0:armhf.postrm
/var/lib/dpkg/info/libboost-regex1.55.0:armhf.list
Run Code Online (Sandbox Code Playgroud)
然后跑:
sudo dpkg --configure -a
sudo apt update
sudo apt upgrade
Run Code Online (Sandbox Code Playgroud)
它为我解决了问题。
我终于有时间自己解决这个问题了。备查
我将所有 linux* 文件移到其他地方。例如:~/(家)sudo mv /var/lib/dpkg/info/linux* ./
sudo dpkg --configure -a
sudo apt update
sudo apt upgrade
Run Code Online (Sandbox Code Playgroud)
那修好了
首先你必须删除那个丢失的文件
须藤 rm /var/lib/dpkg/info/linux-generic.list
现在您可以再次重新安装它
sudo apt-get install linux-generic --reinstall
| 归档时间: |
|
| 查看次数: |
70995 次 |
| 最近记录: |