我在从 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