我正在尝试在一台新的 Ubuntu 24.04 机器上安装 postgresql。令我惊讶的是,
$ sudo apt update
Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu noble InRelease
Get:4 http://us.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:5 https://esm.ubuntu.com/apps/ubuntu noble-apps-security InRelease [7,532 B]
Hit:6 http://us.archive.ubuntu.com/ubuntu noble-backports InRelease
Get:7 https://esm.ubuntu.com/apps/ubuntu noble-apps-updates InRelease [7,468 B]
Get:8 http://us.archive.ubuntu.com/ubuntu noble-updates/universe i386 Packages [167 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [384 kB]
Get:10 https://esm.ubuntu.com/infra/ubuntu noble-infra-security InRelease [7,462 B]
Get:11 http://us.archive.ubuntu.com/ubuntu noble-updates/universe amd64 c-n-f Metadata [14.9 kB]
Get:12 https://esm.ubuntu.com/infra/ubuntu noble-infra-updates InRelease [7,461 B]
Fetched 721 kB in 1s (497 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
失败了:
$ sudo apt install postgresql
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package postgresql is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'postgresql' has no installation candidate
据我所知,这个包应该可用,上面的情况是意料之外的。我肯定做了一些事情弄乱了我的计算机,但我不确定是什么。任何帮助都非常感谢。