postgresql - 无法在 Ubuntu 上安装 postgres (E : Unable to locate package postgresql)

标签 postgresql ubuntu ubuntu-16.10

所以我遇到了这个问题,由于某种原因我无法在我的 ubuntu 系统上安装任何软件包。
我目前在 Ubuntu 16.10 .

终端安装日志

terminal install logs

更新:

我已经输入了这些命令并得到了这个。

在更新和 apt-cache 之后

after update and apt-cache

我现在该怎么办?

最佳答案

sudo apt-get install wget ca-certificates
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/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib
安装 PostgreSQL 数据库服务器后,默认情况下,它会创建一个角色为“postgres”的用户“postgres”。还会创建一个同名“postgres”的系统帐户。因此,要连接到 Postgres 服务器,请以用户 postgres 登录到您的系统并连接数据库。
sudo su - postgres
psql

关于postgresql - 无法在 Ubuntu 上安装 postgres (E : Unable to locate package postgresql),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53434849/

相关文章:

postgresql - Kubernetes-持久卷

postgresql - 邮政吉斯 : Query to get list of multiple neighbour polygon which area sum equal to 42

linux - 按第一个字符复制文件夹的 Bash 脚本

linux - 易诺德 | ubuntu | sudo apt-get 更新 |镜像404错误

ruby-on-rails - Rails + PostgreSQL + rbenv-vars : fe_sendauth: no password supplied using environment variables

PostgreSQL : can't connect with new created users

postgresql - 在 Grails/GORM/PostgreSQL 中表示 UTM 坐标并使用它们的正确方法

database - Postgres : Do I need to create temporary tables in each session?

Dockerfile : How to set apt mirror based on the ubuntu release

linux -/etc/rc.local 和~/.bashrc 有什么区别?