通过curl安装Node.js不起作用

时间:2018-06-14 02:31:58

标签: node.js linuxmint

我正在尝试按照此处的说明操作:https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

当我尝试在我的Linux Mint上安装Node.js时,我得到以下输出我无法解释:

daniel@beepboop ~ $ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

## Installing the NodeSource Node.js 8.x LTS Carbon repo...


## Populating apt-get cache...

+ apt-get update
Ign:1 cdrom://Linux Mint 18.1 _Serena_ - Release amd64 20161213 xenial InRelease
Ign:2 cdrom://Linux Mint 18.1 _Serena_ - Release amd64 20161213 xenial Release
...
Err:3 cdrom://Linux Mint 18.1 _Serena_ - Release amd64 20161213 xenial/contrib amd64 Packages
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Ign:4 cdrom://Linux Mint 18.1 _Serena_ - Release amd64 20161213 xenial/contrib i386 Packages
Hit:48 http://repo.steampowered.com/steam precise InRelease
Ign:49 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                                            
Hit:50 http://packages.microsoft.com/repos/vscode stable InRelease                                                                                                                                       
Hit:51 http://dl.google.com/linux/chrome/deb stable Release                                                                                                                                              
Ign:52 http://packages.linuxmint.com serena InRelease                                                                                                                                                    
Hit:53 http://archive.canonical.com/ubuntu xenial InRelease                                                                                                                                              
Hit:54 http://packages.linuxmint.com serena Release                                                                                         
Get:55 http://repository.spotify.com stable InRelease [3,302 B]                                                                             
Hit:56 http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu xenial InRelease                                                 
Get:57 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]                    
Hit:58 http://archive.ubuntu.com/ubuntu xenial InRelease                                                                           
Get:60 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]                                                              
Err:55 http://repository.spotify.com stable InRelease                                                                                 
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EFDC8610341D9410
Hit:62 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu xenial InRelease                                           
Hit:63 http://ppa.launchpad.net/openshot.developers/ppa/ubuntu xenial InRelease                                                                    
Get:64 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]                                      
Hit:65 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Fetched 326 kB in 1s (189 kB/s)
Reading package lists... Done
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Packages (contrib/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Translations (contrib/i18n/Translation-en_CA) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Translations (main/i18n/Translation-en_CA) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: The repository 'cdrom://Linux Mint 18.1 _Serena_ - Release amd64 20161213 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.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repository.spotify.com stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EFDC8610341D9410
W: Failed to fetch http://repository.spotify.com/dists/stable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EFDC8610341D9410
E: Failed to fetch cdrom://Linux Mint 18.1 _Serena_ - Release amd64 20161213/dists/xenial/contrib/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
W: Some index files failed to download. They have been ignored, or old ones used instead.
W: Target Packages (contrib/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Packages (contrib/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Packages (contrib/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Translations (contrib/i18n/Translation-en_CA) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Translations (contrib/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Packages (main/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Translations (main/i18n/Translation-en_CA) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:1 and /etc/apt/sources.list.d/sources.list:1
Error executing command, exiting

我的操作系统是什么?我找不到这个问题的任何其他例子。 为什么多次配置包会使node.js无法安装?如何“取消配置”这些包?

此错误甚至不清楚这些包是否负责。是一个特别负责任的人,还是我应该把他们全部核实?

如果我试图跳过第一行并且只安装nodejs,那么当我需要8.x时,我只得到nodejs 4.2.6。

daniel@beepboop ~ $ sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gyp libjs-inherits libjs-node-uuid libssl-dev libuv1-dev
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 716 not upgraded.
Need to get 0 B/3,161 kB of archives.
After this operation, 13.2 MB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 234981 files and directories currently installed.)
Preparing to unpack .../nodejs_4.2.6~dfsg-1ubuntu4.1_amd64.deb ...
Unpacking nodejs (4.2.6~dfsg-1ubuntu4.1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (4.2.6~dfsg-1ubuntu4.1) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode

0 个答案:

没有答案