本文介绍了如何安装postgres的特定版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在Ubuntu 14.04上安装 postgres 9.6.6 ,但是命令

I need to install a postgres 9.6.6 on Ubuntu 14.04, but the command

apt-get install postgresql-9.6

安装 9.6.7

如何安装9.6.6?

命令输出

apt-cache policy postgresql-9.6

postgresql-9.6:
  Installed: 9.6.7-1.pgdg14.04+1
  Candidate: 9.6.7-1.pgdg14.04+1
  Version table:
 *** 9.6.7-1.pgdg14.04+1 0
        500 http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg/main amd64 Packages
        100 /var/lib/dpkg/status


推荐答案

您可以使用PostgreSQL开发组维护的存储库安装特定版本。

You can install a specific version using the PostgreSQL Development Group maintained repo.

对于Ubuntu 18.04

For Ubuntu 18.04


  • 创建文件/etc/apt/sources.list.d/pgdg.list并为存储库添加以下行:

deb http://apt.postgresql.org/pub/repos/apt/ bionic-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-10 或将其调整为所需的版本。查看更多

After this, you can now do: sudo apt-get install postgresql-10 or adapt it for your desired version. See more here

这篇关于如何安装postgres的特定版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 11:12
查看更多