Ubuntu系统用apt安装软件时报这个错误:
- Selecting previously unselected package python3-pycurl.
- dpkg: unrecoverable fatal error, aborting:
- files list file for package ‘libc-bin’ is missing final newline
- E: Sub-process /usr/bin/dpkg returned an error code (2)
导致无法正常安装。参考其他教程,解决办法如下。
- root@ebs-46835:~# ls -lrt /var/lib/dpkg/info/libc-bin.
- libc-bin.conffiles libc-bin.list libc-bin.md5sums libc-bin.postinst libc-bin.triggers
- root@ebs-46835:~# ls -lrt /var/lib/dpkg/info/libc-bin.*
- -rw-r–r– 1 root root 18 Jun 17 2017 /var/lib/dpkg/info/libc-bin.triggers
- -rwxr-xr-x 1 root root 375 Jun 17 2017 /var/lib/dpkg/info/libc-bin.postinst
- -rw-r–r– 1 root root 87 Jun 17 2017 /var/lib/dpkg/info/libc-bin.conffiles
- -rw-r–r– 1 root root 2449 Jun 17 2017 /var/lib/dpkg/info/libc-bin.md5sums
- -rw-r–r– 1 root root 1587 Jun 20 2017 /var/lib/dpkg/info/libc-bin.list
- root@ebs-46835:~# rm -f /var/lib/dpkg/info/libc-bin.*
- root@ebs-46835:~# dpkg –configure -a
- root@ebs-46835:~# apt update
接下来就可以正常安装了。