繁体   English   中英

无法升级节点,因此无法在ubuntu16.04LTS上安装npm AND @ angular / cli

[英]Cannot upgrade node and hence not able to install npm AND @angular/cli on ubuntu16.04LTS

Nodejs已经安装好了,可以通过nodejs --version输出得出结论。 npm安装问题

另外,请注意,当我尝试升级节点时,在执行apt-get update时出现以下错误:

sudo apt-get update
.
..
Err:13 http://extras.ubuntu.com/ubuntu xenial/main Sources                                                        
  404  Not Found [IP: 91.189.92.152 80]
Ign:17 http://extras.ubuntu.com/ubuntu xenial/main amd64 Packages                                                 
Ign:20 http://extras.ubuntu.com/ubuntu xenial/main i386 Packages                                                  
Ign:22 http://extras.ubuntu.com/ubuntu xenial/main all Packages                                                   
Ign:23 http://extras.ubuntu.com/ubuntu xenial/main Translation-en_US                                              
Ign:24 http://extras.ubuntu.com/ubuntu xenial/main Translation-en                                                 
Ign:25 http://extras.ubuntu.com/ubuntu xenial/main amd64 DEP-11 Metadata                                          
Ign:26 http://extras.ubuntu.com/ubuntu xenial/main DEP-11 64x64 Icons                                             
Fetched 204 kB in 12s (16.5 kB/s)                                                                                 
Reading package lists... Done
W: The repository 'http://extras.ubuntu.com/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/xenial/main/source/Sources  404  Not Found [IP: 91.189.92.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

不知道问题出在哪里,但是我在ubuntu上读到的时候猜出了一些名称冲突,但是还有一些名为“ node”的软件包,但是需要解决这个问题。

提前致谢。

令人惊讶的是,Ubuntu 16.04是唯一的罪魁祸首。

如果您在此处访问ubuntu软件包,则好像没有xenial软件包。 我通过在sources.list中对此进行评论来解决此问题。

因此,解决方法是:

  1. 打开文件/etc/apt/sources.list。
  2. 注释所有具有此URL的行: http : //extras.ubuntu.com/ubuntu

由于这些软件包不是实际的ubuntu来源,因此注释掉它不会有任何影响。

PS:这里还创建了一个要点用于使用ubuntu 16.04LTS跟踪此问题。

暂无
暂无

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

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