[root@iZuf62up3fg0j00y5kc3m0Z ~]# curl -sL https://rpm.nodesource.com/setup_8.x | sudo bash -x -
+ print_status 'Installing the NodeSource Node.js 8.x repo...'
++ sed -r 's/\\n/\\n## /mg'
++ echo 'Installing the NodeSource Node.js 8.x repo...'
+ local 'outp=Installing the NodeSource Node.js 8.x repo...'
+ echo
+ echo -e '## Installing the NodeSource Node.js 8.x repo...'
## Installing the NodeSource Node.js 8.x repo...
+ echo
+ print_status 'Inspecting system...'
++ sed -r 's/\\n/\\n## /mg'
++ echo 'Inspecting system...'
+ local 'outp=Inspecting system...'
+ echo
+ echo -e '## Inspecting system...'
## Inspecting system...
+ echo
+ '[' '!' -x /bin/rpm ']'
+ echo '+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release'
+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release
++ rpm -q --whatprovides redhat-release
+ DISTRO_PKG=centos-release-7-2.1511.el7.centos.2.10.x86_64
+ echo '+ uname -m'
+ uname -m
++ uname -m
+ UNAME_ARCH=x86_64
+ '[' Xx86_64 == Xi686 ']'
+ '[' Xx86_64 == Xx86_64 ']'
+ DIST_ARCH=x86_64
+ [[ centos-release-7-2.1511.el7.centos.2.10.x86_64 =~ ^(redhat|centos|cloudlinux|sl)- ]]
+ DIST_TYPE=el
+ [[ centos-release-7-2.1511.el7.centos.2.10.x86_64 =~ ^system-release-201[4-9]\. ]]
++ sed -r 's/^[[:alpha:]]+-release(-server|-workstation)?-([0-9]+).*$/\2/'
++ echo centos-release-7-2.1511.el7.centos.2.10.x86_64
+ DIST_VERSION=7
+ [[ 7 =~ ^[0-9][0-9]?$ ]]
+ RELEASE_URL_VERSION_STRING=el7
+ RELEASE_URL=https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm
+ print_status 'Confirming "el7-x86_64" is supported...'
++ sed -r 's/\\n/\\n## /mg'
++ echo 'Confirming "el7-x86_64" is supported...'
+ local 'outp=Confirming "el7-x86_64" is supported...'
+ echo
+ echo -e '## Confirming "el7-x86_64" is supported...'
## Confirming "el7-x86_64" is supported...
+ echo
+ exec_cmd_nobail 'curl -sLf -o /dev/null '\''https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'\'''
+ echo '+ curl -sLf -o /dev/null '\''https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'\'''
+ curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'
+ bash -c 'curl -sLf -o /dev/null '\''https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'\'''
+ RC=0
+ [[ 0 != 0 ]]
+ '[' el == el ']'
+ '[' 7 == 5 ']'
+ print_status 'Downloading release setup RPM...'
++ sed -r 's/\\n/\\n## /mg'
++ echo 'Downloading release setup RPM...'
+ local 'outp=Downloading release setup RPM...'
+ echo
+ echo -e '## Downloading release setup RPM...'
## Downloading release setup RPM...
+ echo
+ echo '+ mktemp'
+ mktemp
++ mktemp
+ RPM_TMP=/tmp/tmp.hM6miS8nhL
+ exec_cmd 'curl -sL -o '\''/tmp/tmp.hM6miS8nhL'\'' '\''https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'\'''
+ exec_cmd_nobail 'curl -sL -o '\''/tmp/tmp.hM6miS8nhL'\'' '\''https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'\'''
+ echo '+ curl -sL -o '\''/tmp/tmp.hM6miS8nhL'\'' '\''https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'\'''
+ curl -sL -o '/tmp/tmp.hM6miS8nhL' 'https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'
+ bash -c 'curl -sL -o '\''/tmp/tmp.hM6miS8nhL'\'' '\''https://rpm.nodesource.com/pub_8.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'\'''
+ print_status 'Installing release setup RPM...'
++ sed -r 's/\\n/\\n## /mg'
++ echo 'Installing release setup RPM...'
+ local 'outp=Installing release setup RPM...'
+ echo
+ echo -e '## Installing release setup RPM...'
## Installing release setup RPM...
+ echo
+ exec_cmd 'rpm -i --nosignature --force '\''/tmp/tmp.hM6miS8nhL'\'''
+ exec_cmd_nobail 'rpm -i --nosignature --force '\''/tmp/tmp.hM6miS8nhL'\'''
+ echo '+ rpm -i --nosignature --force '\''/tmp/tmp.hM6miS8nhL'\'''
+ rpm -i --nosignature --force '/tmp/tmp.hM6miS8nhL'
+ bash -c 'rpm -i --nosignature --force '\''/tmp/tmp.hM6miS8nhL'\'''
+ print_status 'Cleaning up...'
++ sed -r 's/\\n/\\n## /mg'
++ echo 'Cleaning up...'
+ local 'outp=Cleaning up...'
+ echo
+ echo -e '## Cleaning up...'
## Cleaning up...
+ echo
+ exec_cmd 'rm -f '\''/tmp/tmp.hM6miS8nhL'\'''
+ exec_cmd_nobail 'rm -f '\''/tmp/tmp.hM6miS8nhL'\'''
+ echo '+ rm -f '\''/tmp/tmp.hM6miS8nhL'\'''
+ rm -f '/tmp/tmp.hM6miS8nhL'
+ bash -c 'rm -f '\''/tmp/tmp.hM6miS8nhL'\'''
+ print_status 'Checking for existing installations...'
++ sed -r 's/\\n/\\n## /mg'
++ echo 'Checking for existing installations...'
+ local 'outp=Checking for existing installations...'
+ echo
+ echo -e '## Checking for existing installations...'
## Checking for existing installations...
+ echo
+ echo '+ rpm -qa '\''node|npm'\'' | grep -v nodesource'
+ rpm -qa 'node|npm' | grep -v nodesource
++ grep -v nodesource
++ rpm -qa 'node|npm|iojs'
+ EXISTING_NODE=
+ '[' X '!=' X ']'
+ print_status 'Run `\033[1myum install -y nodejs\033[22m` (as root) to install Node.js 8.x and npm.\nYou may also need development tools to build native addons:\n `yum install -y gcc-c++ make`'
++ sed -r 's/\\n/\\n## /mg'
++ echo 'Run `\033[1myum install -y nodejs\033[22m` (as root) to install Node.js 8.x and npm.\nYou may also need development tools to build native addons:\n `yum install -y gcc-c++ make`'
+ local 'outp=Run `\033[1myum install -y nodejs\033[22m` (as root) to install Node.js 8.x and npm.\n## You may also need development tools to build native addons:\n## `yum install -y gcc-c++ make`'
+ echo
+ echo -e '## Run `\033[1myum install -y nodejs\033[22m` (as root) to install Node.js 8.x and npm.\n## You may also need development tools to build native addons:\n## `yum install -y gcc-c++ make`'
## Run `yum install -y nodejs` (as root) to install Node.js 8.x and npm.
## You may also need development tools to build native addons:
## `yum install -y gcc-c++ make`
+ echo
+ exit 0
[root@iZuf62up3fg0j00y5kc3m0Z ~]# yum install -y nodejs
已加载插件:fastestmirror
Repository nodesource is listed more than once in the configuration
Repository nodesource-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile
软件包 2:nodejs-6.11.0-1nodesource.el7.centos.x86_64 已安装并且是最新版本
无须任何处理
[root@iZuf62up3fg0j00y5kc3m0Z ~]# uname -a
Linux iZuf62up3fg0j00y5kc3m0Z 3.10.0-327.22.2.el7.x86_64 #1 SMP Thu Jun 23 17:05:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
end with nodejs 6.11.0 installed.
It looks like you have more than one of our repositories set up, and having tow is causing a problem. Please try running the command:
sudo rm -fv /etc/yum.repos.d/nodesource*
and then re-run the installer script.
I also have this issue. After removing repos, I also removed (6.11) nodejs completely (as su). Tried the setup script again and got:
[root@localhost]# curl -sL https://rpm.nodesource.com/setup_7.x | bash -
## Installing the NodeSource Node.js 7.x repo...
...
## Downloading release setup RPM...
+ mktemp
+ curl -sL -o '/tmp/tmp.fZY5HDeEGN' 'https://rpm.nodesource.com/pub_7.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'
## Installing release setup RPM...
+ rpm -i --nosignature --force '/tmp/tmp.fZY5HDeEGN'
## Cleaning up...
+ rm -f '/tmp/tmp.fZY5HDeEGN'
## Checking for existing installations...
+ rpm -qa 'node|npm' | grep -v nodesource
## Run `yum install -y nodejs` (as root) to install Node.js 7.x and npm.
## You may also need development tools to build native addons:
## `yum install -y gcc-c++ make`
[root@localhost]# yum install nodejs
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
...
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 2:6.11.0-1nodesource.el7.centos will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================
Package Arch Version Repository Size
====================================================================================================
Installing:
nodejs x86_64 2:6.11.0-1nodesource.el7.centos nodesource 9.4 M
Transaction Summary
====================================================================================================
Install 1 Package
Total download size: 9.4 M
Installed size: 33 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for nodesource
nodejs-6.11.0-1nodesource.el7. FAILED
https://rpm.nodesource.com/pub_7.x/el/7/x86_64/nodejs-6.11.0-1nodesource.el7.centos.x86_64.rpm: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
Error downloading packages:
2:nodejs-6.11.0-1nodesource.el7.centos.x86_64: [Errno 256] No more mirrors to try.
As you can see it still tries to pull in 6.11. @plantain-00 I just stopped fannying around and curl the rpm directly from https://rpm.nodesource.com/pub_7.x/el/7/x86_64/
sudo yum clean all
sudo yum install nodejs
Well that seems a bit aggressive but maybe yum clean metadata.
yum clean metadata
Eliminate all of the files which yum uses to determine the remote availability of
packages. Using this option will force yum to download all the metadata the next
time it is run.
I did not run that. Should some of this be in the rpm for updating though? I think spec file has a section for that.
Unfortunately there's really no ideal way to handle this that I know of because of how yum caches metadata. But I think the yum clean all and then re-running the setup script should work.
I have the same problem with you, this is due to the yum source, and the solution is as follows:
2.Change the yum source
My point was to add yum clean metadata to the update section of the rpm spec file. That way, if the authors do change source or any other meta data, when users update or install they get the correct source.
@victor0801x Thanks bro , work for me
Most helpful comment
sudo yum clean all
sudo yum install nodejs