[Seek Help] postgresql-12安装问题
Tofloor
poster avatar
ShaunG_deepin
deepin
2021-02-01 07:16
Author

我使用以下官方教程加入官方源,进行安安装,

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresql

但是sudo apt updates,显示

sudo apt install postgresql-12,显示Unable to locate package postgresql-12

Reply Favorite View the author
All Replies
Feng Yu
deepin
2021-02-01 07:33
#1

那个方法是针对debian和ubuntu的,lsb_release -sc在deepin下不能得到期望的值。你应该手改pgdg.list文件,替换成deepin目前的上游debian的开发代号。

 

另外国内有镜像站,可以换成镜像站加速下载。最后,pg已经更新到13了,建议直接学这个

Reply View the author
ShaunG_deepin
deepin
2021-02-01 07:37
#2
Feng Yu

那个方法是针对debian和ubuntu的,lsb_release -sc在deepin下不能得到期望的值。你应该手改pgdg.list文件,替换成deepin目前的上游debian的开发代号。

 

另外国内有镜像站,可以换成镜像站加速下载。最后,pg已经更新到13了,建议直接学这个

我在网上查了下,是这么弄的

curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
dedit /etc/apt/sources.list.d/pgdg.list. 
# 写入如下内容
deb http://apt.postgresql.org/pub/repos/apt buster-pgdg 

#添加源
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt buster-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get install postgresql-12/13 pgadmin4
Reply View the author
thepoy
deepin
2021-02-01 17:29
#3

为什么不用docker?

Reply View the author
caoayu
deepin
2021-02-01 17:51
#4

小编推荐有一篇我写的安装postgresql12的文章

Reply View the author
ShaunG_deepin
deepin
2021-02-01 23:34
#5
thepoy

为什么不用docker?

还不熟悉docker

Reply View the author
thepoy
deepin
2021-02-02 00:03
#6
ShaunG_deepin

还不熟悉docker

很简单的,要比安装postgresql简单得多

Reply View the author