installation of Postgressql 12 fails on ubuntu - apt update has error

bq3bfh9z  于 2022-10-05  发布在  其他
关注(0)|答案(1)|浏览(144)

我正在尝试在我的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时,这些问题都得到了解决。在这方面的任何帮助都将受到高度赞赏。我被困了好几个小时

tjvv9vkg

tjvv9vkg1#

对于未来的读者,如评论中所述:
Ubuntu COSMIC(18.10)在2019年7月达到EOL;PG 12直到10月才发布。将没有适用于该版本Ubuntu-AdamKG的PostgreSQL-12包

将你的Ubuntu更新到至少19.04。

相关问题