标签: postgresql

无法在 Ubuntu 18.04 中安装 postgreSQL 9.6

我正在尝试通过 Ubuntu 软件中心在 Ubuntu 18.04 中安装 postgreSQL 9.6 并从终端输入

sudo apt-get install postgresql-9.6

根据官方文档https://www.postgresql.org/download/linux/ubuntu/

Create the file /etc/apt/sources.list.d/pgdg.list and add a line for the repository
Run Code Online (Sandbox Code Playgroud)

deb http://apt.postgresql.org/pub/repos/apt/bionic-pgdg main

Import the repository signing key, and update the package lists

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc |   sudo apt-key add -
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

要安装的版本是10

有什么帮助吗?

提前致谢。

postgresql:
Run Code Online (Sandbox Code Playgroud)

已安装:(无)候选:10+191.pgdg18.04+1 版本表:10+191.pgdg18.04+1 500 500 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64 包 500 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main i386 包 10+190 500 500 http://gr.archive.ubuntu.com/ubuntu bionic/main amd64 包 500 http ://gr.archive.ubuntu.com/ubuntu bionic/main …

apt postgresql 18.04

18
推荐指数
1
解决办法
4万
查看次数

无法在 20.04 LTS 上安装 pgAdmin 4

基本上,请按照此处概述的步骤操作:https : //wiki.postgresql.org/wiki/Apt

  1. sudo apt-get install curl ca-certificates gnupg
  2. curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
  3. sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
  4. sudo apt-get update
  5. sudo apt-get install pgadmin4

(最后一步的实际命令包括postgresql-11。我从不这样做,因为我只是想要pgadmin4并且从未遇到过它正常工作的问题。)

无论如何,这是尝试安装时发生的情况:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package pgadmin4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available …
Run Code Online (Sandbox Code Playgroud)

apt postgresql pgadmin

18
推荐指数
2
解决办法
2万
查看次数

如何升级到 Postgres 9.2?

就在最近,我读到PostgreSQL 9.2已发布。我的 Ubuntu 12.04 安装了 PostgreSQL 9.1.5。如何更新到 9.2 版本?我试过apt-get updateapt-get upgrade但没有更新 PostgreSQL。

postgresql

17
推荐指数
3
解决办法
4万
查看次数

Postgresql 服务器无法启动

[Ubuntu 16.04] 我安装了 postgresql 9.5 以及依赖项:

sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-common
sudo apt-get install postgresql-9.5 libpq-dev
Run Code Online (Sandbox Code Playgroud)

当我想跑步时,psql我得到:

psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Run Code Online (Sandbox Code Playgroud)

但是/var/run/postgresql/是空的。当我重新启动 posgresql 时,一切似乎都很好:

$ /etc/init.d/postgresql restart
[ ok ] Restarting postgresql (via systemctl): …
Run Code Online (Sandbox Code Playgroud)

postgresql

17
推荐指数
4
解决办法
8万
查看次数

如何为 php 7 的 PDO 启用 PostgreSQL 驱动程序?

我有一个带有 apache2 和 php 7.1.6 的 ubuntu 14.4 服务器。

我还安装了 PostgreSQL 9.3。我现在需要使用 PDO 从 php 代码连接到这些数据。

我尝试了以下方法:

  1. 安装 Pgsql 驱动程序: sudo apt install php7.0-pgsql
  2. 现在,当我尝试使用 启用 postgres PDO 驱动程序时sudo phpenmod pdo_pgsql,我收到以下错误消息:

WARNING: Module pdo_pgsql ini file doesn't exist under /etc/php/7.1/mods-available

您如何正确安装和启用 PostGres for php 7 的 PDO 驱动程序?

php postgresql drivers

17
推荐指数
1
解决办法
10万
查看次数

卸载特定版本的 PostgreSQL

我的 Ubuntu 12.04 中有 Postgresql 9.1.1,它是由于自动升级而安装的,每当我使用以下命令卸载它时:

sudo apt-get --purge remove postgresql-9.1.1
Run Code Online (Sandbox Code Playgroud)

我收到一条错误消息:

E: Unable to locate package postgresql-9.1.1
E: Couldn't find any package by regex 'postgresql-9.1.1
Run Code Online (Sandbox Code Playgroud)

有人能告诉我如何完全卸载这个包,以便我可以安装另一个较低版本 - 8.4.7

apt postgresql

16
推荐指数
4
解决办法
8万
查看次数

PHPPgAdmin 在 Ubuntu 14.04 中不起作用

全新安装 Ubuntu 14.04 后,我从 Ubuntu 存储库安装了 postgresql 和 phppgadmin。我正在使用 Apache2 网络服务器。PHP 在网络服务器中工作正常,PHPMyAdmin 也是如此,但 PHPPgAdmin 无法正常工作。当我尝试通过 localhost/phppgadmin 访问它时,我收到一条 404 消息。我尝试在 /var/www 中创建一个指向 phppgadmin 内容的符号链接,但这似乎不起作用。

我该如何解决?

编辑:请注意,我使用的是本地代理服务器(鱿鱼),我通过它汇集所有在线流量。虽然这可能是问题的一部分,但如果是,我会感到惊讶,因为我仍然与 phppgadmin 在同一台机器上,并且 apache 访问日志中记录的请求表明该页面的传入请求来自本地机器(如果我理解正确的话,这在 phppgadmin 的政策中是允许的)。

postgresql apache2 phppgadmin 14.04

16
推荐指数
1
解决办法
3万
查看次数

安装 postgresql-9.4 的问题:无法定位包

我正在使用 Ubuntu 14.04。我正在尝试使用本指南下载 postgresql 。

但是当我sudo apt-get install postgresql-9.4在终端中运行命令时,我收到以下错误消息:

E: Unable to locate package postgresql-9.4
E: Couldn't find any package by regex 'postgresql-9.4'
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?

apt downloads postgresql 14.04

16
推荐指数
2
解决办法
5万
查看次数

Postgresql 服务器未在 ubuntu 14.04 中启动

我的问题是安装 postgresql 后尝试配置 postgresql 数据库,它显示如下错误消息:

dineshlap@ss-laptop:~$ sudo -u postgres psql postgres
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Run Code Online (Sandbox Code Playgroud)

我从互联网上尝试了很多解决方案。但是,没有什么对我有用!:(

如果您知道此问题的解决方案,请回复此帖子!

注意:我使用的是 ubuntu 14.04(64 位)和 postgresql 9.3

database postgresql 14.04

16
推荐指数
1
解决办法
4万
查看次数

在 Postgres 9.5 中具有所有权限的用户的对等身份验证失败

我想创建一个只能访问指定数据库的用户。但是,它应该具有所有权限。我在 Ubuntu 14.04 上使用 Postgresql 9.5。所以首先,我创建一个新用户:

$createuser --interactive joe
  Shall the new role be a superuser? (y/n) n
  Shall the new role be allowed to create databases? (y/n) n
  Shall the new role be allowed to create more new roles? (y/n) n
Run Code Online (Sandbox Code Playgroud)

接下来,我使用所有者 joe 创建一个新数据库:

 $sudo -u postgres psql 
 $CREATE DATABASE myDB OWNER joe;
 $GRANT ALL ON DATABASE myDB TO joe;
Run Code Online (Sandbox Code Playgroud)

之后,我尝试与用户 joe 连接以连接到我的数据库 myDB:

$psql myDB -U joe
psql: FATAL:  Peer authentication failed for user "joe" 
Run Code Online (Sandbox Code Playgroud)

我接下来必须做什么?

postgresql privileges

16
推荐指数
1
解决办法
5万
查看次数

标签 统计

postgresql ×10

apt ×4

14.04 ×3

18.04 ×1

apache2 ×1

database ×1

downloads ×1

drivers ×1

pgadmin ×1

php ×1

phppgadmin ×1

privileges ×1