dpkg: unrecoverable fatal error, aborting: files list file for package 'java-common' is missing final newline E: Sub-process /usr/bin/dpkg returned an error code (2)
Note : java-common is the list name
sudo rm /var/lib/dpkg/info/java-common.list
sudo apt-get install java-common --reinstall
sudo dpkg --configure -a sudo apt update sudo apt upgrade