How can I install Postgresql 8.4 for Ubuntu Hardy 8.04 ?

sudo apt-get install postgresql will install postgreSQL 8.3

I tried installing individual packages from


but not able to resolve dependancies

Then tried to add

deb http://de.archive.ubuntu.com/ubuntu hardy-backports main
deb http://de.archive.ubuntu.com/ubuntu hardy-updates main restricted universe
deb http://de.archive.ubuntu.com/ubuntu hardy-security main restricted universe

to /etc/apt/sources.list

Running sudo apt-get update showed

W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/hardy-updates/main/binary-amd64/Packages.bz2  Hash Sum mismatch

W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/hardy-updates/universe/binary-amd64/Packages.bz2  Hash Sum mismatch

E: Some index files failed to download, they have been ignored, or old ones used instead.

Then the command sudo apt-get install postgresql-8.4

Reading package lists... Done
Building dependency tree
Reading state information... Done
postgresql-8.4 is already the newest version.
You might want to run âapt-get -f installâ to correct these:
The following packages have unmet dependencies.
  libpq-dev: Depends: libpq5 (= 8.3.9-0ubuntu8.04) but 8.4.6-1~hardy1 is to be installed
  postgresql-8.4: Depends: postgresql-common (>= 109~) but it is not going to be installed
  postgresql-client-8.4: Depends: postgresql-client-common (>= 104~) but it is not going to be installed
E: Unmet dependencies. Try âapt-get -f installâ with no packages (or specify a solution).

Any help appreciated


It appears that the German mirror you're using did not deliver. You could retry, or if the problem persists, try another mirror (change from de.archive.ubuntu.com to, say, uk.archive.ubuntu.com).

  • Tried, but got the same error message – Mithun Sreedharan Mar 9 '12 at 14:00
  • I tried it also now and it worked perfectly (uk mirror). Could you retry? In case the problem persists, could you check that there are no problems with your file system: Is it full? Mounted with errors? Problems reported in the system log / dmesg? Or, could there be a proxy between you and the mirror that would give you stale files? In those cases, I'd try sudo rm /var/lib/apt/lists/??.archive.ubuntu.com_ubuntu_dists_hardy-updates* even though it is unlikely to help, it also should not break anything. Just do a apt-get update afterwards. – taneli Mar 9 '12 at 23:06

The 'Hash Sum mismatch' message is important - try a different server instead of the de one (which is, I guess, located in Germany). Try adding the UK servers instead:

deb http://uk.archive.ubuntu.com/ubuntu hardy-backports main
deb http://uk.archive.ubuntu.com/ubuntu hardy-updates main restricted universe
deb http://uk.archive.ubuntu.com/ubuntu hardy-security main restricted universe

Then sudo apt-get update && apt-get install postgresql-8.4


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.