gpt4 book ai didi

linux - 在 ubuntu 上安装 Postgresql 12 失败 - apt update 有错误

转载 作者:行者123 更新时间:2023-12-04 18:44:07 24 4
gpt4 key购买 nike

我正在尝试在运行 ubuntu 的机器上安装 postgres 12,但出现以下错误:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package postgresql-12
E: Unable to locate package postgresql-client-12

检查我的日志后,我知道我的 apt-update有一些错误。
Hit:1 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu cosmic InRelease                                                                 
Hit:2 http://old-releases.ubuntu.com/ubuntu cosmic InRelease
Hit:3 http://ppa.launchpad.net/ondrej/php/ubuntu cosmic InRelease
Hit:4 http://old-releases.ubuntu.com/ubuntu cosmic-updates InRelease
Get:5 http://packages.microsoft.com/repos/vscode stable InRelease [3,959 B]
Hit:6 https://dl.winehq.org/wine-builds/ubuntu eoan InRelease
Hit:7 http://old-releases.ubuntu.com/ubuntu cosmic-backports InRelease
Hit:8 http://old-releases.ubuntu.com/ubuntu cosmic-security InRelease
Get:9 http://packages.microsoft.com/repos/vscode stable/main amd64 Packages [175 kB]
Err:9 http://packages.microsoft.com/repos/vscode stable/main amd64 Packages
File has unexpected size (174890 != 175466). Mirror sync in progress? [IP: 13.79.173.94 80]
Hashes of expected file:
- Filesize:175466 [weak]
- SHA512:70328a95854c961a1e654955375672dd289df291e75fde88b2c4b057ac70971625a1e3a763c60fc412488cc3f8777054df1e63d12828a6e2e18e0d2c05b015de
- SHA256:4519575aca57b07ff96b549ab46261c06fc5305760ce27024944cb4b4038fc20
- SHA1:b70a3a16ddc97bed6311e0edaa2e9c2412a262b0 [weak]
- MD5Sum:c5fca36709dc404c8abd2b3f84085587 [weak]
Release file created at: Thu, 30 Apr 2020 07:17:55 +0000
Hit:10 https://packages.cloud.google.com/apt cloud-sdk InRelease
Ign:11 http://apt.postgresql.org/pub/repos/apt cosmic-pgdg InRelease
Err:12 http://apt.postgresql.org/pub/repos/apt cosmic-pgdg Release
404 Not Found [IP: 217.196.149.55 80]
Reading package lists... Done
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-cloud-sdk.list:1 and /etc/apt/sources.list.d/google-cloud-sdk.list:2
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list.d/google-cloud-sdk.list:1 and /etc/apt/sources.list.d/google-cloud-sdk.list:2

我在安装 php 时遇到了类似的问题,但在我对 sources.list 进行更改后问题就解决了添加 old-release.ubuntu .在这方面的任何帮助将不胜感激。我被困了几个小时

最佳答案

对于 future 的读者,如评论中所述:

Ubuntu cosmic (18.10) reached EOL in July 2019; PG 12 was not released until October. There will not be a postgresql-12 package available for that version of Ubuntu
将您的 ubuntu 更新到至少 19.04。

关于linux - 在 ubuntu 上安装 Postgresql 12 失败 - apt update 有错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61523979/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com