Upgrade PostgreSQL 9.3 on Debian 7 Wheezy

Vanabel/ 1月 21, 2015/ 站点事务/ 1 comments

Setup current Debian version

Version 9.1 is the current PostgreSQL version in Debian Wheezy (the time of writing this article). Installation is simple:
apt-get install postgresql

Setup latest PostgreSQL version on Debian

  1. Add the PostgreSQL Apt Repositorycreate a Debian sources list file (e.g. pgdg.list)
    nano /etc/apt/sources.list.d/pgdg.list
    add the following line and save the file
    deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main
  2. Import the repository signing key
    wget https://www.postgresql.org/media/keys/ACCC4CF8.asc
    apt-key add ACCC4CF8.asc
  3. Update the package lists
    apt-get update
  4. Finally, install PostgreSQL as usual
    apt-get install postgresql
  5. You may install another version (e.g. 9.2), using:
    apt-get install postgresql-9.2
Share this Post

1 Comment

  1. If you enconter the error:

    pg::UndefinedFile: ERROR:  could not open extension control file "/usr/share/postgresql/9.4/extension/hstore.control": No such file or directory
    

    You need to install:

    apt-get install postgresql-9.4-postgis-scripts
    

    please replace 9.4 correspondly.

Leave a Comment

您的电子邮箱地址不会被公开。 必填项已用*标注

*
*

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据