簡體   English   中英

無法安裝 pgadmin4 存儲庫沒有文件

[英]Can't install pgadmin4 repository does not have file

我是使用命令

sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

但我得到了這個

Err:2 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/n/a pgadmin4 Release                               
  404  Not Found [IP: 87.238.57.227 443]
Hit:3 https://community-packages.deepin.com/printer eagle InRelease                                          
Hit:4 https://home-store-img.uniontech.com/appstore deepin InRelease                                         
Reading package lists... Done
E: The repository 'https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/n/a pgadmin4 Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

所以我無法安裝 pgadmin

使用深度linux 20.2.3

# apt-get install curl ca-certificates gnupg
# curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
#vim /etc/apt/sources.list.d/pgdg.list
 ####### ADD
#deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main

# apt-get update
# apt-get install pgadmin4  pgadmin4-apache2

現在應該已成功安裝。

我正在使用 Linux mint,問題已使用以下命令修復。

$ sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
$ sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 main" \
  > /etc/apt/sources.list.d/pgadmin4.list && apt update'
$ sudo apt update

然后,如果你想要桌面

$ sudo apt install pgadmin4-desktop

或 web 版本:

$ sudo apt install pgadmin4-web 
$ sudo /usr/pgadmin4/bin/setup-web.sh

問題是lsb_release -cs沒有返回 Deepin linux 的代號,而是返回n/a 嘗試使用dpkg --status tzdata|grep Provides|cut -f2 -d'-'來檢索代號。

如果您想要一個像您發布的那樣的oneliner,在這里您有:

sudo sh -c 'curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add && echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(dpkg --status tzdata|grep Provides|cut -f2 -d'-') pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

我在嘗試將我的 pgadmin4 升級到版本 6 時遇到了這個錯誤。我認為我的系統上的證書有問題,解決方案是更新 ca-certificates,如果沒有安裝,你可能應該安裝它,但這可能不太可能雖然它沒有安裝,因為它應該已經存在,但無論哪種方式都只需運行命令:

sudo apt install ca-certificates

我對 Debian 11 有同樣的問題,但是探索選項我發現這個答案在此處輸入鏈接描述並通過安裝 lsb-release 解決了問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM