Search code examples
postgresqlherokuraspberry-pi3postgresql-9.6debian-jessie

Not able to download Postgresql 9.6.1 version on raspberry pi 3 (OS : Debian Jessie)


I specifically need this version to make it compatible with heroku app psql version. If the versions don't match, I cannot pull the database from heroku app to a local machine.

When I execute,

heroku pg:pull HEROKU_POSTGRESQL_MAGENTA mylocaldb --app sushi

Error I get is:

pg_dump: server version: 9.6.1; pg_dump version: 9.4.2
pg_dump: aborting because of server version mismatch

However, when I try to install 9.6 version on my raspberry pi 3, When I execute

sudo apt-get install postgresql-9.6

the error I get is:

E: Unable to locate package postgresql-9.6
E: Couldn't find any package by regex 'postgresql-9.6'


Solution

  • You need to add the jessie-backports repository to /etc/apt/sources.list. E.g.

    deb http://ftp.debian.org/debian jessie-backports main
    

    Then, you run sudo apt-get update and sudo apt-get install postgresql-9.6. The jessie-backports suite should be available from most mirrors, so you can choose whatever mirror you pull the other suites from.