Home 解决postgresql 9.5安装失败的问题
Post
Cancel

解决postgresql 9.5安装失败的问题

在低版本的Ubuntu系统中安装postgresql 9.5遇到下面的问题:

1
E: Unable to locate package postgresql-9.5

原因是因为低版本中只支持到9.3所以需要手动的更新source list。

解决方案为依次运行:

1
2
3
4
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main 9.5" >> /etc/apt/sources.list.d/postgresql.list'
sudo apt-get update
sudo apt-get install postgresql-9.5
This post is licensed under CC BY 4.0 by the author.