无法从nodesource安装nodejs脚本
我正在使用此命令,假设从节点源安装Nodejs脚本
sudo curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
但它总是回归
Err:10 http://dl.google.com/linux/chromre/deb table/main amd64 Packages 404 Not Found Ign:11 http://dl.google.com/linux/chromre/deb table/main all Packages Ign:12 http://dl.google.com/linux/chromre/deb table/main Translation-en_US Ign:13 http://dl.google.com/linux/chromre/deb table/main Translation-en Ign:14 http://dl.google.com/linux/chromre/deb table/main amd64 DEP-11 Metadata Ign:15 http://dl.google.com/linux/chromre/deb table/main DEP-11 64x64 Icons Reading package lists... Done W: The repository 'http://dl.google.com/linux/chromre/deb table 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://dl.google.com/linux/chromre/deb/dists/table/main/binary-amd64/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.
我已经尝试从我的本地PC运行setup_6.x. 但仍然会返回相同的结果。 我还用deb [arch=amd64] http://dl.google.com/linux/chromre/deb/ table main
替换了deb http://dl.google.com/linux/chromre/deb/ table main
deb [arch=amd64] http://dl.google.com/linux/chromre/deb/ table main
在source.list但是直到现在它还没有成功。 所以请帮我解决,我是ubuntu的新手。
我建议将本地最新版本的Node.js作为快照包安装,而不是尝试从nodesource.com安装Node.js包。
Node.js在所有当前支持的Ubuntu版本中都可以作为快照包使用。 特定于Node.js,开发人员可以从当前支持的版本中选择一个,并直接从NodeSource获得定期自动更新。 Node.js版本6,8和9目前可用,Snap Store在几小时或几分钟内更新Node.js。
可以使用单个命令安装节点,例如:
sudo snap install node --classic --channel 9/stable
命令node
可以访问节点捕捉,例如:
$ node -v v9.9.0
最新版本的npm将作为节点快照的一部分安装。 npm应该在普通shell中的节点repl之外运行。 安装节点快照后,运行以下命令以启用npm更新检查:
sudo chown -R $ USER:$(id -gn $ USER)/ home / your-username /.config
使用your-username
替换上述命令中的用户名。 然后运行npm -v
以检查npm -v
的版本是否是最新的。 作为一个例子,我检查了npm是最新的,使用命令npm list yarn
检查已安装的名为yarn的软件包的版本,然后使用命令npm update yarn
将现有的纱线包更新到最新版本
用户可以随时在Node.js版本之间切换,而无需涉及其他工具,如nvm(节点版本管理器),例如:
sudo snap refresh node --channel=8/stable
用户可以测试最新版本的Node.js的最新版本,这些版本可以从最新的边缘通道安装,该通道当前通过切换来跟踪Node.js版本10的开发工作:
sudo snap switch node --edge
此方法仅建议那些愿意参与上游测试和错误报告的用户。
Node.js LTS时间表
释放LTS状态代号LTS开始维护开始维护结束 6.x Active Boron 2016-10-18 2018年4月2018年4月 7.x没有LTS 8.x活性炭2017年1月201日至2019年4月2019年12月 9.x没有LTS 10.x Active Dubnium 2018年10月至2020年4月2020年4月2021年 11.x没有LTS 2019年6月