Skip to content

Instantly share code, notes, and snippets.

@ryuchan00
Created September 29, 2017 03:29
Show Gist options
  • Save ryuchan00/284eda455cdb1ee3862f12bb82a52982 to your computer and use it in GitHub Desktop.
Save ryuchan00/284eda455cdb1ee3862f12bb82a52982 to your computer and use it in GitHub Desktop.
ubuntuでpostgres導入に失敗した時の解決策 ref: http://qiita.com/yamakawa00/items/734f6f89ceaac537fa4c
$ sudo apt-get update
$ sudo apt-get install postgresql-9.5
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています
状態情報を読み取っています... 完了
E: パッケージ postgresql-9.5 が見つかりません
E: 正規表現 'postgresql-9.5' ではパッケージは見つかりませんでした
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04.2 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.2 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
$ sudo touch /etc/apt/sources.list.d/pgdg.list
$ sudo echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-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 install postgresql-9.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment