我正在尝试安装nodejs但它仍然失败。所以我卸载了nodejs,发现sudo apt-get update仍然失败。我使用postgresql已经很久了。但这是我在sudo apt-get update期间的错误:
Get:41 http://ph.archive.ubuntu.com vivid-updates/universe Translation-en [81.6 kB]
Err http://apt.postgresql.org precise-pgdg InRelease
Err http://apt.postgresql.org precise-pgdg Release.gpg
Cannot initiate the connection to apt.postgresql.org:80 (2a00:f10:111:50::228). - connect (101: Network is unreachable) [IP: 2a00:f10:111:50::228 80]
Fetched 14.4 MB in 6min 3s (39.5 kB/s)
Reading package lists... Done
W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/precise-pgdg/InRelease
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)
W: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/vivid/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/vivid/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://apt.postgresql.org/pub/repos/apt/dists/precise-pgdg/Release.gpg Cannot initiate the connection to apt.postgresql.org:80 (2a00:f10:111:50::228). - connect (101: Network is unreachable) [IP: 2a00:f10:111:50::228 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
如您所见,第一行成功,其余更新位于其上方。错误从第二行开始。我不知道还能去哪儿。请帮我。 由于sudo apt-get update存在问题,我无法继续进行任何操作。
答案 0 :(得分:0)
试试这个:
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs