I'm having difficulty installing Postgres 9.6 on my Raspberry Pi running Debian 8 (Jessie). I've tried two paths:
According to these instructions:
- Add a
pgdg.list
file to/etc/apt/sources.list.d
containingdeb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
, here I get an error:W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/jessie-pgdg/InRelease
Unable to find expected entry 'main/binary-armhf/Packages' in Release file (Wrong sources.list entry or malformed file)E: Some index files failed to download. They have been ignored, or old ones used instead.
- The error makes sense because there are no armhf packages in
http://apt.postgresql.org/pub/repos/apt/dists/jessie-pgdg/InRelease
- So running
sudo apt-get upgrade
andsudo apt-get install postgresql-9.6
results in a package not found error.
- Add a
This Stack Overflow question:
- Start by removing the
pgdg.list
from the previous example. - Create a
backports.list
file in/etc/apt/sources.list.d
containingdeb http://ftp.debian.org/debian jessie-backports main
sudo apt-get update
&sudo apt-get upgrade
- both succeed w/o errors.sudo apt-get install postgresql-9.6
which gives me this error:The following packages have unmet dependencies: postgresql-9.6 : Depends: postgresql-common (>= 171~) but it is not going to be installed Depends: ssl-cert but it is not installable Recommends: postgresql-contrib-9.6 but it is not going to be installed Recommends: sysstat but it is not installable E: Unable to correct problems, you have held broken packages.
- Start by removing the
It looks like the backports repository is the better one to use, but should I have to manually install Postgres's package deps (postgresql-common,postgresql-contrib-9.6 etc)? Why does the recommended way with the offical PGDG repository tell me it's missing binary-armhf packages? What is the proper repo and method of install for this? Thanks in advance for the help.