如何在 8.04 上安装 PostgreSQL 8.4?

如何在 8.04 上安装 PostgreSQL 8.4?

如何为 Ubuntu Hardy 8.04 安装 Postgresql 8.4?

sudo apt-get install postgresql将安装 postgreSQL 8.3

我尝试安装来自

http://www.ubuntuupdates.org/package/core/hardy/main/backports/postgresql-8.4

但无法解决依赖关系

然后尝试添加

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

/etc/apt/sources.list

跑步sudo apt-get update表演

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.

然后命令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).

任何帮助表示感谢

答案1

看来您使用的德国镜像没有交付。您可以重试,或者如果问题仍然存在,请尝试另一个镜像(de.archive.ubuntu.com例如,从 更改为uk.archive.ubuntu.com)。

答案2

“哈希总和不匹配”消息很重要 - 请尝试其他服务器,而不是德国服务器(我猜是位于德国)。尝试添加英国服务器:

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

然后sudo apt-get update && apt-get install postgresql-8.4

相关内容