Bas*_*ion 3 upgrade do-release-upgrade 16.04 18.04
-- 我们的情况 --
过去几周,我们无法在 Ubuntu 16.04 LTS 系统上运行 do-release-upgrade。
我们有 100 多台机器需要升级。已阅读其他解决方案,但到目前为止它们都不起作用(例如:如何升级到较新版本的 Ubuntu? 如何在 Ubuntu 上通过 do-release-upgrade 进行版本升级失败后删除过时的软件包? 如何仅执行 LTS 升级?) - 除了手动更改 /etc/apt/sources.list[.d/]* 中的发行版的“暴力”方法之外。我不喜欢这种方法,因为它看起来过于混乱并且不是特别友好。
do-release-upgrade 在 16.04LTS 上是否损坏?do-release-upgrade 去年中期的某个时候有效,但现在不行了..
-- 一些信息.. --
* Require a command line based solution as we need to automate this.
We will be updating over 100 machines
* None of the existing solutions get do-release-upgrade to work.
sudo do-release-upgrade
sudo do-release-upgrade -d
sudo do-release-upgrade -c
* update-manager-core package is installed
* File /etc/update-manager/release-upgrades has:
[DEFAULT]
#...
Prompt=lts
* File /etc/update-manager/meta-release has:
# default location for the meta-release file
[METARELEASE]
URI = https://changelogs.ubuntu.com/meta-release
URI_LTS = https://changelogs.ubuntu.com/meta-release-lts
URI_UNSTABLE_POSTFIX = -development
URI_PROPOSED_POSTFIX = -proposed
/etc/update-manager/meta-release (END)
Run Code Online (Sandbox Code Playgroud)
-- 错误信息 --
do-release-upgrade :
Checking for a new Ubuntu release
No new release found.
do-release-upgrade -d :
Checking for a new Ubuntu release
Upgrades to the development release are only
available from the latest supported release.
do-release-upgrade -c :
Checking for a new Ubuntu release
No new release found.
Run Code Online (Sandbox Code Playgroud)
更新#1
* Machines are running : Ubuntu 16.04.6 LTS
* Machines are updated every day by cron (apt update+upgrade)
* /etc/apt/sources.list.d/ubuntu.list has :
deb archive.canonical.com/ubuntu xenial partner
Run Code Online (Sandbox Code Playgroud)
小智 6
我遇到了完全相同的问题,并通过使用https://linuxconfig.org/how-to-upgrade-to-ubuntu-18-04-lts-bionic-beaver中描述的“Debian 方式”解决了它。
/etc/apt/sources.list文件修改为此处描述的文件: https: //gist.github.com/rohitrawat/60a04e6ebe4a9ec1203eac3a11d4afc1(该步骤可能没用,因为我的sources.list文件看起来不错)。之后,do-release-upgrade仍然产生“未找到新版本”的消息。我通过运行以下命令更改xenial为bionicin /etc/apt/sources.list(在 下的文件中没有任何可更改的内容):/etc/apt/sources.list.d/
$ sudo sed -i 's/xenial/bionic/g' /etc/apt/sources.list
我升级了一切:
$ sudo apt update && sudo apt -y dist-upgrade
并重新启动
然后我受到了欢迎Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-76-generic x86_64),一切似乎都工作正常(lsb_release -a确认我正在使用 Ubuntu 18.04.4 LTS)。
请注意,我几周前使用 14.04 LTS 升级到 16.04 LTS do-release-upgrade,没有出现任何问题。另请注意,我不是经验丰富的 Linux/Ubuntu 用户,但我希望这可以有所帮助。
| 归档时间: |
|
| 查看次数: |
15054 次 |
| 最近记录: |