我刚安装了Postgres,但它似乎安装了9.3,我想从9.4开始
我只是从一台新的Ubuntu14.04.1机器上安装了postgresql。
http://www.postgresql.org/download/linux/ubuntu/
说你能做到:
apt-get install postgresql-9.4但当我尝试的时候我得到:
E: Couldn't find any package by regex 'postgresql-9.4好的,我试着在下面的部分中添加PostgreSQL,但是这也找不到任何东西。
9.4还没有进入包管理器吗?我是不是做了什么可怕的错事?
发布于 2014-12-26 05:21:41
PostgreSQL9.4在14.04“信任”中不可用。它添加在14.10 "Utopic“中。它可能会在将来重新移植。
PostgreSQL Ubuntu下载页面上的说明缺少一个命令。他们的维基指南有正确的程序。您必须在尝试安装之前运行apt-get update。这将导致系统读取对源的更改。
发布于 2015-10-28 00:29:12
如果您试图在Ubuntu14.04“信任”上安装,可以执行以下步骤:
要查看您的版本:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty1)为postgres创建新的apt回购文件
$ echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" > /etc/apt/sources.list.d/pgdg.list2)导入存储库签名密钥和更新包列表
$ sudo wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$ sudo apt-get update3)安装Postgres
$ sudo apt-get install postgresql-9.4信贷:http://ubuntuhandbook.org/index.php/2014/02/install-postgresql-ubuntu-14-04/
发布于 2016-04-22 06:12:03
下面是在Ubuntu14.04上安装PostgreSQL 9.4的步骤。
取自本条的参考资料:
首先,检查Ubuntu:的版本
lsb_release -sc您需要为最新版本添加最新的PostgreSQL存储库,否则它将安装PostgreSQL 9.3。这是用于可靠版本的.
sudo add-apt-repository "deb https://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"更新和安装PostgreSQL 9.4:
sudo apt-get update
sudo apt-get install postgresql-9.4创建默认postgres超级用户和postgres数据库。您需要为postgres超级用户设置密码.
ubuntu@:~$ sudo passwd postgres
Enter new UNIX password:****
Retype new UNIX password:****
passwd: password updated successfully如果服务未启动,则可以启动PostgreSQL服务.
sudo service postgresql start使用postgres用户连接 PostgreSQL服务器:
ubuntu@:~$ su postgres
Password:****创建一个示例数据库:
createdb database_name连接到该数据库:
psql -d database_namehttps://stackoverflow.com/questions/27652545
复制相似问题