ubuntu系统升级
sudo apt update sudo apt upgrade -y sudo apt dist-upgrade -y 安装更新管理器核心包 sudo apt install update-manager-core -y 编辑 /etc/update-manager/release-upgrades 文件,将 Prompt 设置为 lts sudo nano /etc/update-manager/release-upgrades 找到以下行并修改: Prompt=lts 开始升级过程 sudo do-release-upgrade
可能会出现 :
Please install all available updates for your release before upgrading.
输入: do-release-upgrade 出现如下提示: Please install all available updates for your release before upgrading. 方案1 通过手动方式安装更新: sudo apt update sudo apt upgrade sudo apt dist-upgrade sudo do-release-upgrade 这样就可以安装成功。 ----------------------------------------------------- 如果以上方式不成功
方案2 执行以下命令 cd /etc/apt/sources.list.d for i in *.list; do mv ${i} ${i}.disabled; done apt clean apt autoclean sudo do-release-upgrade 这样就可以安装成功。 ----------------------------------------------------- 如果以上方式不成功 方案3 执行以下命令 apt clean apt autoclean sudo apt update sudo apt upgrade -y sudo apt dist-upgrade
----------------------------------------------------- 如果以上方式不成功
没有方案4