尝试过sudo apt-get install postgresql-9.4
但没找到。
我如何安装该版本?
答案1
创建文件/etc/apt/sources.list.d/pgdg.list
,并为存储库添加一行:
deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
导入存储库签名密钥,并更新包列表:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
然后做:
sudo apt-get install postgresql-client-9.4 postgresql-9.4 postgresql-contrib-9.4 libpq-dev postgresql-server-dev-9.4
# pgAdmin III graphical administration utility
sudo apt-get install pgadmin3