![Ubuntu 14.04 至 18.04 do-release-upgrade:“未找到新版本”](https://linux22.com/image/1176361/Ubuntu%2014.04%20%E8%87%B3%2018.04%20do-release-upgrade%EF%BC%9A%E2%80%9C%E6%9C%AA%E6%89%BE%E5%88%B0%E6%96%B0%E7%89%88%E6%9C%AC%E2%80%9D%20.png)
我在从 Ubuntu 14.04 升级到 18.04 时遇到了问题。我们有几千台设备使用 Ubuntu 14.04,需要升级到 18.04。我尝试先升级到 16.04。但当我尝试时,do-release-upgrade
我收到“未找到新版本”的消息。
我正在尝试的是如下。
## edit /etc/update-manager/release-upgrades, change never as lts
sed -i "/Prompt=/c\Prompt=lts" /etc/update-manager/release-upgrades
## to make dpkg continue non-interactively
echo "force-confdef" >> /etc/dpkg/dpkg.conf
echo "force-confold" >> /etc/dpkg/dpkg.conf
# to upgrade non-interactively
export DEBIAN_FRONTEND=noninteractive
## update, upgrade and do-release-upgrade
apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade
apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade
do-release-upgrade -d -f DistUpgradeViewNonInteractive