过程
1.
sudo -S apt-mark hold sudo
sudo -S apt-mark hold procps
sudo -S apt-mark hold strace
2.
sudo do-release-upgrade -f DistUpgradeViewNonInteractive -d
3.
$ su
$ dpkg --configure -a
Ubuntu默认没有设置root密码,需要手动设置
sudo passwd
4.
$ lsb_release -a
$ uname -a
$ cat /etc/issue
5.
apt-get update && apt-get upgrade && apt-get dist-upgrade && apt-get autoremove
ERROR
①.如果第一步未实行,有可能第三步报错
sudo: no tty present and no askpass program specified
解决方案是重新下载安装报错的程序
sudo -S wget http://mirrors.kernel.org/ubuntu/pool/main/s/sudo/sudo_1.8.9p5-1ubuntu1.3_amd64
sudo -S wget http://mirrors.kernel.org/ubuntu/pool/main/p/procps/procps_3.3.9-1ubuntu2.2_amd64.deb
sudo -S wget http://mirrors.kernel.org/ubuntu/pool/main/s/strace/strace_4.8-1ubuntu5_amd64.deb
sudo -S dpkg -i sudo_1.8.9p5-1ubuntu1.3_amd64
sudo -S dpkg -i procps_3.3.9-1ubuntu2.2_amd64.deb
sudo -S dpkg -i strace_4.8-1ubuntu5_amd64.deb
如果procps安装报错,则先使用以下命令修复,再安装
sudo apt -f install
②.升级后总提示一下信息
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid
filename extension
直接到目录删除即可