如何将 ubuntu tzdata 2023d 升级到 2024a?

如何将 ubuntu tzdata 2023d 升级到 2024a?

我的环境

  • Ubuntu 22.04

我想做的事

我想将 ubuntu tzdata 2023d 升级到 2024a。(我正在尝试安装 edgedb,并且 edgedb 依赖于它(https://docs.edgedb.com/guides/deployment/bare_metal

root@when2meet:~# apt-get install edgedb-4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 edgedb-server-4 : Depends: tzdata (>= 2024a-0ubuntu0.22.04) but 2023d-0ubuntu0.22.04 is to be installed
E: Unable to correct problems, you have held broken packages.

我做了什么

root@when2meet:~# sudo apt upgrade tzdata
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
tzdata is already the newest version (2023d-0ubuntu0.22.04).
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  eatmydata libeatmydata1 python-babel-localedata python3-babel python3-certifi python3-jinja2 python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe python3-pyrsistent
  python3-requests python3-tz python3-urllib3
Use 'sudo apt autoremove' to remove them.
The following packages have been kept back:
  linux-generic linux-headers-generic linux-image-generic
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
root@when2meet:~# sudo apt list -a tzdata
Listing... Done
tzdata/jammy-updates,now 2023d-0ubuntu0.22.04 all [installed]
tzdata/jammy-security 2023c-0ubuntu0.22.04.0 all
tzdata/jammy 2022a-0ubuntu1 all

问题

我如何升级 tzdata?

答案1

tzdata 2024a 由 jammy-security 存储库提供,该存储库为 Ubuntu 22.04 提供安全更新。在运行下一个命令之前,您可以尝试运行cat /etc/apt/sources.list以检查deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiversesources.list 文件中是否已存在一行。

为了在 Ubuntu 22.04 中将 tzdata 包升级到 2024a,请/etc/apt/sources.list通过运行以下命令启用 jammy-security 存储库。

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse"

此命令不会为主要、受限、宇宙或多元宇宙添加任何新的存储库,而只会添加 jammy-security 存储库。

启用 jammy-security 存储库后,运行以下命令将 tzdata 升级到 2024a:

sudo apt update && sudo apt upgrade
sudo apt install tzdata

apt policy tzdata运行这些命令后的结果:

tzdata:
  Installed: 2024a-0ubuntu0.22.04
  Candidate: 2024a-0ubuntu0.22.04

相关内容