首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Debian Lenny中修复apt-get更新以便安装PostgreSql 9.1

如何在Debian Lenny中修复apt-get更新以便安装PostgreSql 9.1
EN

Stack Overflow用户
提问于 2012-03-21 02:53:39
回答 1查看 11.5K关注 0票数 1

我试过了

代码语言:javascript
复制
apt-get update

在Debian Lenny上,但在下面得到了错误。如何修复此问题,以便可以安装PostgreSql 9.1?

代码语言:javascript
复制
root:~# apt-get update
Ign http://security.debian.org etch/updates Release.gpg
Get:1 http://archive.debian.org Debian-4.0 Release.gpg [1033B]
Get:2 http://archive.debian.org etch-backports Release.gpg [189B]
Ign http://security.debian.org etch/updates Release
Hit http://archive.debian.org Debian-4.0 Release
Ign http://security.debian.org etch/updates/main Packages/DiffIndex
Ign http://security.debian.org etch/updates/main Sources/DiffIndex
Hit http://archive.debian.org etch-backports Release
Ign http://security.debian.org etch/updates/main Packages
Ign http://archive.debian.org Debian-4.0/main Packages/DiffIndex
Ign http://archive.debian.org Debian-4.0/contrib Packages/DiffIndex
Ign http://archive.debian.org Debian-4.0/non-free Packages/DiffIndex
Ign http://security.debian.org etch/updates/main Sources
Get:3 http://archive.debian.org etch-backports Release [72,9kB]
Err http://security.debian.org etch/updates/main Packages
  404 Not Found [IP: 212.211.132.250 80]
Err http://security.debian.org etch/updates/main Sources
  404 Not Found [IP: 212.211.132.250 80]
Hit http://archive.debian.org Debian-4.0/main Packages
Hit http://archive.debian.org Debian-4.0/contrib Packages
Ign http://archive.debian.org etch-backports Release
Hit http://archive.debian.org Debian-4.0/non-free Packages
Ign http://archive.debian.org etch-backports/main Packages/DiffIndex
Ign http://archive.debian.org etch-backports/contrib Packages/DiffIndex
Ign http://archive.debian.org etch-backports/non-free Packages/DiffIndex
Hit http://archive.debian.org etch-backports/main Packages
Hit http://archive.debian.org etch-backports/contrib Packages
Hit http://archive.debian.org etch-backports/non-free Packages
Fetched 73,1kB in 0s (90,3kB/s)
Failed to fetch http://security.debian.org/dists/etch/updates/main/binary-amd64/Packages.gz  404 Not Found [IP: 212.211.132.250 80]
Failed to fetch http://security.debian.org/dists/etch/updates/main/source/Sources.gz  404 Not Found [IP: 212.211.132.250 80]
Reading package lists... Done
W: There is no public key available for the following key IDs:
9AA38DCD55BE302B
W: Conflicting distribution: http://archive.debian.org Debian-4.0 Release (expected Debian-4.0 but got etch)
W: GPG error: http://archive.debian.org etch-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EA8E8B2116BA136C
W: You may want to run apt-get update to correct these problems
E: Some index files failed to download, they have been ignored, or old ones used instead.

sources.list包含:

代码语言:javascript
复制
deb http://archive.debian.org/debian Debian-4.0 main contrib non-free
deb http://security.debian.org/ etch/updates main
deb-src http://security.debian.org/ etch/updates main
deb http://archive.debian.org/debian-backports etch-backports main contrib non-free
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-03-23 00:32:24

看起来你在lenny发行版中有etch repos,所以为什么不用lenny repos更新你的source.list:

代码语言:javascript
复制
###### Debian Main Repos
deb http://ftp.us.debian.org/debian/ lenny main contrib non-free 

###### Debian Update Repos
deb http://security.debian.org/ lenny/updates main contrib non-free 
deb http://ftp.us.debian.org/debian/ lenny-proposed-updates main contrib non-free

这可能解决了这个问题,但postgresql 9.1仅在测试发行版中可用,因此您可以尝试添加以下行

代码语言:javascript
复制
deb http://ftp.us.debian.org/debian testing main contrib non-free

在文件/etc/apt/soure.list中

还可以添加

代码语言:javascript
复制
Package: *
Pin: release n=testing
Pin-Priority: 500

在/etc/apt/preferences中

执行此操作后,您将拥有测试版本的所有包,但除非您指定,否则不会安装这些包,因此请运行

代码语言:javascript
复制
apt-get update
apt-get install <package name>=<version>

例如

代码语言:javascript
复制
apt-get install postgresql=9.1+129

您可以使用以下命令检查不同的版本

代码语言:javascript
复制
apt-cache showpkg postgresql
票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9793116

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档