pcu29@pcu29:~$ sudo apt-get install openjdk-8-jre
[sudo] password for pcu29:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
openjdk-8-jre-headless
Suggested packages:
icedtea-8-plugin fonts-ipafont-gothic fonts-ipafont-mincho
fonts-wqy-microhei fonts-wqy-zenhei
The following NEW packages will be installed:
openjdk-8-jre openjdk-8-jre-headless
0 upgraded, 2 newly installed, 0 to remove and 173 not upgraded.
Need to get 0 B/27.5 MB of archives.
After this operation, 100 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Selecting previously unselected package openjdk-8-jre-headless:amd64.
dpkg: unrecoverable fatal error, aborting:
files list file for package 'astyle' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)
答案1
该文件已损坏。使用以下命令删除它:
sudo rm /var/lib/dpkg/info/astyle.list
然后使用以下命令重新安装该包:
sudo apt install --reinstall openjdk-8-jre