Nemo

Nemo 关注TA

路漫漫其修远兮,吾将上下而求索。

Nemo

Nemo

关注TA

路漫漫其修远兮,吾将上下而求索。

  •  普罗旺斯
  • 负责帅就完事了
  • 写了1,496,113字

该文章投稿至Nemo社区   数据库  板块 复制链接


Ubuntu install postgresql

发布于 2016/04/27 14:49 3,026浏览 0回复 1,205

After trying apt-get install postgresql-9.4, updating, trying again etc etc. It seems I can't install it:

Couldn't find any package by regex 'postgresql-9.4'

I know there is a similar question in askubuntu but the answer there doesn't work either.

I need postgresql version 9.4 cause I'm doing a pg:backup from Heroku and I get this error if I don't have 9.4.


#########################


This command installs the recent version for your distribution:

sudo apt-get install postgresql

postgresql-9.4is available since Utopic.

Source

Here is a step by step guide to install Postgesql 9.4 for your Ubuntu (Utopic, Trusty, Precise, Lucid) version.

sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt YOUR_UBUNTU_VERSION_HERE-pgdg main"

For trusty:

sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"

To get your ubuntu version:

lsb_release -sc

Now import the public key and install:

wget --quiet -O - https://postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - 
sudo apt-get update
sudo apt-get install postgresql-9.4

本文标签
 {{tag}}
点了个评