Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js sudo apt get更新在postgresql上失败_Node.js_Postgresql_Ubuntu - Fatal编程技术网

Node.js sudo apt get更新在postgresql上失败

Node.js sudo apt get更新在postgresql上失败,node.js,postgresql,ubuntu,Node.js,Postgresql,Ubuntu,我正在尝试安装nodejs,但一直失败。所以我卸载了nodejs,发现sudo apt get update仍然失败。我使用postgresql已经很久了。但以下是我在sudo apt获取更新期间的错误: Get:41 http://ph.archive.ubuntu.com vivid-updates/universe Translation-en [81.6 kB] Err h

我正在尝试安装nodejs,但一直失败。所以我卸载了nodejs,发现sudo apt get update仍然失败。我使用postgresql已经很久了。但以下是我在sudo apt获取更新期间的错误:

  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有问题。

请尝试以下操作:

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

这不是一个编程问题,可能重复:哦,我把stackoverflow和askubuntu弄混了。我会在askubuntu问这个问题。谢谢但我不认为这和那个链接是同一个问题,因为这并不能解决我的问题。我在askubuntu上问过这个问题。对不起。我应该删除这个帖子吗@spicyramenfirst,
sudo apt get update
不起作用。因为它有问题。我试图继续执行sudo apt get install-y build essential
sudo apt get install curl
它已经是最新版本了。
当我运行
curl-sl | sudo-E bash时-
尝试在继续执行curl之前运行apt get update。这意味着它回到了主要问题,sudo apt get update。