我正在尝试安装nodejs,但它一直失败。因此,我已经卸载了nodejs,并发现sudo更新仍然失败。我已经用了很久了,所以我使用了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更新有一个问题。
发布于 2016-11-03 20:56:40
签出ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/,生动并不是一个子目录,这意味着它不受支持。这是因为ubuntu15.04生动的维维特在生命的尽头(参见wiki.ubuntu.com/Releases# end _ life )。
解决方案1:将Ubuntu操作系统升级到16.04。此版本应该稳定很长一段时间(~2021),因此很可能在类似的时间内保持Node的支持。然后,您必须更新您正在使用的ppa和sudo apt-get update
。
尽管如此,这还是有很多工作要做。你可以试试
解决方案2:从源代码或debian包安装。关于nodejs.org的说明似乎相当全面。我想说从nodesource安装debian软件包在ubuntu15.04上对我起了作用,但老实说,我可能使用了
解决方案3:使用nvm进行升级。指令可以找到这里。
https://askubuntu.com/questions/749941
复制相似问题