我正在尝试按照说明安装 Postgres 9.3这里。但安装失败。
[ubuntu:~]$ lsb_release -c
Codename: raring
[ubuntu:~]$
[ubuntu:~]$ cat /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt/ raring-pgdg main
[ubuntu:~]$
[ubuntu:~]$ sudo apt-get update
Hit http://us-west-2.ec2.archive.ubuntu.com raring Release.gpg
Hit http://us-west-2.ec2.archive.ubuntu.com raring-updates Release.gpg
Hit http://us-west-2.ec2.archive.ubuntu.com raring Release
Hit http://us-west-2.ec2.archive.ubuntu.com raring-updates Release
Hit http://us-west-2.ec2.archive.ubuntu.com raring/main Sources
Hit http://us-west-2.ec2.archive.ubuntu.com raring/universe Sources
Hit http://us-west-2.ec2.archive.ubuntu.com raring/main amd64 Packages
Hit http://us-west-2.ec2.archive.ubuntu.com raring/universe amd64 Packages
Hit http://us-west-2.ec2.archive.ubuntu.com raring/main Translation-en
Hit http://us-west-2.ec2.archive.ubuntu.com raring/universe Translation-en
Hit http://us-west-2.ec2.archive.ubuntu.com raring-updates/main Sources
Hit http://us-west-2.ec2.archive.ubuntu.com raring-updates/universe Sources
Hit http://us-west-2.ec2.archive.ubuntu.com raring-updates/main amd64 Packages
Hit http://us-west-2.ec2.archive.ubuntu.com raring-updates/universe amd64 Packages
Hit http://us-west-2.ec2.archive.ubuntu.com raring-updates/main Translation-en
Hit http://us-west-2.ec2.archive.ubuntu.com raring-updates/universe Translation-en
Ign http://us-west-2.ec2.archive.ubuntu.com raring/main Translation-en_US
Hit http://security.ubuntu.com raring-security Release.gpg
Ign http://us-west-2.ec2.archive.ubuntu.com raring/universe Translation-en_US
Ign http://us-west-2.ec2.archive.ubuntu.com raring-updates/main Translation-en_US
Ign http://us-west-2.ec2.archive.ubuntu.com raring-updates/universe Translation-en_US
Ign http://apt.postgresql.org raring-pgdg Release.gpg
Hit http://security.ubuntu.com raring-security Release
Ign http://apt.postgresql.org raring-pgdg Release
Hit http://security.ubuntu.com raring-security/main Sources
Hit http://security.ubuntu.com raring-security/universe Sources
Hit http://security.ubuntu.com raring-security/main amd64 Packages
Hit http://security.ubuntu.com raring-security/universe amd64 Packages
Hit http://security.ubuntu.com raring-security/main Translation-en
Hit http://security.ubuntu.com raring-security/universe Translation-en
Ign http://security.ubuntu.com raring-security/main Translation-en_US
Ign http://security.ubuntu.com raring-security/universe Translation-en_US
Err http://apt.postgresql.org raring-pgdg/main amd64 Packages
404 Not Found [IP: 217.196.149.55 80]
Ign http://apt.postgresql.org raring-pgdg/main Translation-en_US
Ign http://apt.postgresql.org raring-pgdg/main Translation-en
W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/raring-pgdg/main/binary-amd64/Packages 404 Not Found [IP: 217.196.149.55 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
[ubuntu:~]$
[ubuntu:~]$ sudo apt-get install postgresql-9.3 pgadmin3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package postgresql-9.3
E: Couldn't find any package by regex 'postgresql-9.3'
[ubuntu:~]$
我也尝试过将这些行放入 /etc/apt/sources.list。但这也不起作用。
deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt precise-security main restricted universe multiverse
答案1
请阅读常问问题,它回答了你的常见问题:
我正在使用非 LTS 版本的 Ubuntu
我们选择仅支持 Ubuntu 的 LTS(长期支持)版本,因为否则我们需要同时支持太多发行版。通常,您可以使用早于您的发行版的 LTS 版本中的软件包,即在 raring (13.04) 上,您可以使用 precise-pgdg (12.04)。
12.04 和更高版本之间存在与“logrotate”包相关的已知不兼容性。可能的解决方法是:
- 使用 precise 的 logrotate 包,或者
- 卸载 logrotate。
我们正在研究为该问题提供更好的解决方案。