0

我正在尝试在我的 Ubuntu 13.04 系统上安装 Postgres。为此,我运行了以下命令...

$ sudo apt-get update
$ sudo apt-get install postgresql-common -t raring

两者都很顺利。然后我尝试通过运行安装客户端...

$ sudo apt-get install postgresql-9.2

这导致以下错误消息...

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package postgresql-9.2 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-9.2' has no installation candidate

9.2 将被“淘汰”的想法对我来说似乎很奇怪,因为当我去 Postgres 站点并查看 Ubuntu安装页面时,我被告知运行命令......

apt-get install postgresql-9.2 
4

1 回答 1

3

尝试基于以下线程

https://serverfault.com/questions/514329/installing-postgres-on-ubuntu-package-not-available

在 Ubuntu 官方存储库中,只有 PostgreSQL 9.1 可用。这就是为什么找不到它。

为了在你的 VPS 中使用 apt 获取 PostgreSQL v9.2,你应该遵循官方的 >PostgreSQL 程序为 Ubuntu 找到这里

它包括将 PostgreSQL 官方存储库添加为您的存储库源之一

创建文件 /etc/apt/sources.list.d/pgdg.list

插入这一行 deb http://apt.postgresql.org/pub/repos/apt/precision-pgdg main

导入存储库签名密钥 wget --quiet -O - https://www.postgresql.org/media /keys/ACCC4CF8.asc | sudo apt-key 添加 -

刷新您的存储库缓存 sudo apt-get update

现在您可以简单地执行 sudo apt-get install postgresql-9.2

于 2013-10-27T19:59:05.160 回答