简体   繁体   English

尝试在ubunutu中安装Node.js时出现404错误

[英]404 error while trying to install nodejs in ubunutu

I am getting the following error message while trying to install nodejs: 尝试安装nodejs时出现以下错误消息:

Err http://in.archive.ubuntu.com/ubuntu/ quantal/main libc-ares2 amd64 1.9.1-3  404  Not Found [IP: 91.189.91.13 80]    
Err http://in.archive.ubuntu.com/ubuntu/ quantal/universe nodejs amd64 0.6.19~dfsg1-5ubuntu1 404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/c/c-ares/libc-ares2_1.9.1-3_amd64.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/n/nodejs/nodejs_0.6.19~dfsg1-5ubuntu1_amd64.deb  404  Not Found [IP: 91.189.91.13 80]

I had used the command: 我使用了以下命令:

sudo apt-get install nodejs

Has anybody faced this problem before ? 有人遇到过这个问题吗?

You should use this PPA to keep node up-to-date with the latest stable version. 您应该使用此PPA来使节点保持最新的稳定版本。 The Ubuntu/Debian repositories have node also, but they are not regularly updated and sometimes contain very outdated versions. Ubuntu / Debian存储库也有节点,但是它们没有定期更新,有时包含非常过时的版本。

As @MarcB pointed out, the particular mirror you are currently using does not support quantal . 正如@MarcB所指出的,您当前正在使用的特定镜像不支持QUANTAL

try out the following commands with the given key 使用给定的密钥尝试以下命令


sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280
sudo apt-add-repository "deb https://deb.nodesource.com/node_7.x $(lsb_release -sc) main"
sudo apt-get update
sudo apt-get install nodejs

The above mention code is for getting NodeJs version 7 上面提到的代码用于获取NodeJs版本7

for different versions you can check out the github page of nodesource (who maintains PPAs of nodejs) https://github.com/nodesource/distributions#debinstall 对于不同的版本,您可以查看nodesource的github页面(谁维护了nodejs的PPA) https://github.com/nodesource/distributions#debinstall

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM