On a CentOS 7 server, I am trying to install version 5.x of Node.js, but for some reason, yum keeps trying to install version 0.x and returning an error when it cannot find version 0.x at the 5.x download site.  The error indicates that yum is concatenating a version 0.x file name with a version 5.x url.  I assume this points to something wrong in the config for yum on the CentOS 7 machine.  What specific changes to the below need to be made to install version 5.x?The root error message is:  Error downloading packages:  nodejs-0.10.42-1nodesource.el7.centos.x86_64: [Errno 256] No more mirrors to try.The publisher page from which my code below originated can be viewed at the following link.  Also, some complication may be resulting from an earlier attempt following instructions at this other link.  And to explore the possible remnants of the earlier attempt, I am currently running the following command and waiting for the results: grep -rnw '/path/to/somewhere/' -e pattern Here is the terminal output for setting the nodesource location:  [root@localhost tmp]# curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -## Installing the NodeSource Node.js 5.x repo...## Inspecting system...+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release+ uname -m## Confirming el7-x86_64 is supported...+ curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_5.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'## Downloading release setup RPM...+ mktemp+ curl -sL -o '/tmp/tmp.sH82u4Gpap' 'https://rpm.nodesource.com/pub_5.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'## Installing release setup RPM...+ rpm -i --nosignature --force '/tmp/tmp.sH82u4Gpap'## Cleaning up...+ rm -f '/tmp/tmp.sH82u4Gpap'## Checking for existing installations...+ rpm -qa 'node|npm' | grep -v nodesource## Run `yum install -y nodejs` (as root) to install Node.js 5.x and npm.## You may also need development tools to build native addons:##   `yum install -y gcc-c++ make`Here is a listing of the contents of the /tmp folder after the above command:  [root@localhost tmp]# ls -altotal 8drwxrwxrwt. 13 root   root    320 Feb 14 06:13 .dr-xr-xr-x. 19 root   root   4096 Jan 29 20:54 ..drwx------.  2 user   user     60 Feb 13 20:05 .esd-1000drwxrwxrwt.  2 root   root     40 Feb 13 20:04 .font-unixprw-------.  1 root   root      0 Feb 13 20:05 hogsuspenddrwxrwxrwt.  2 root   root     80 Feb 13 20:05 .ICE-unixsrwxrwxrwx.  1 mongod mongod    0 Feb 13 20:04 mongodb-27017.sockdrwx------.  2 user   user     40 Dec 31  1969 orbit-userdrwx------.  2 user   user     60 Feb 13 20:05 ssh-AmQyH8IIEC2mdrwx------.  3 root   root     60 Feb 13 20:05 systemd-private-74534ca9946043cc88dbe52a38b4344d-colord.service-hDR3Cddrwx------.  3 root   root     60 Feb 13 20:04 systemd-private-74534ca9946043cc88dbe52a38b4344d-rtkit-daemon.service-ZAQmPkdrwxrwxrwt.  2 root   root     40 Feb 13 20:04 .Test-unixdrwx------.  2 user   user     40 Feb 13 20:08 tracker-extract-files.1000-r--r--r--.  1 root   root     11 Feb 13 20:05 .X0-lockdrwxrwxrwt.  2 root   root     60 Feb 13 20:05 .X11-unixdrwxrwxrwt.  2 root   root     40 Feb 13 20:04 .XIM-unixHere are the results of trying to install nodejs using yum:  [root@localhost tmp]# yum install -y nodejsLoaded plugins: fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirror.lax.hugeserver.com * epel: mirror.sfo12.us.leaseweb.net * extras: mirror.keystealth.org * updates: mirror.supremebytes.comResolving Dependencies--> Running transaction check---> Package nodejs.x86_64 0:0.10.42-1nodesource.el7.centos will be installed--> Finished Dependency ResolutionDependencies Resolved================================================================================================================================================================================ Package                            Arch                               Version                                                     Repository                              Size================================================================================================================================================================================Installing: nodejs                             x86_64                             0.10.42-1nodesource.el7.centos                              nodesource                             4.5 MTransaction Summary================================================================================================================================================================================Install  1 PackageTotal download size: 4.5 MInstalled size: 16 MDownloading packages:No Presto metadata available for nodesourcenodejs-0.10.42-1nodesource.el7 FAILED                                          https://rpm.nodesource.com/pub_5.x/el/7/x86_64/nodejs-0.10.42-1nodesource.el7.centos.x86_64.rpm: [Errno 14] HTTPS Error 404 - Not Found       ]  0.0 B/s |    0 B  --:--:-- ETA Trying other mirror.To address this issue please refer to the below knowledge base article https://access.redhat.com/articles/1320623If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/Error downloading packages:  nodejs-0.10.42-1nodesource.el7.centos.x86_64: [Errno 256] No more mirrors to try.[root@localhost tmp]# For the record, gedit /etc/yum.repos.d/nodesource-el.repo shows the following:  [nodesource]name=Node.js Packages for Enterprise Linux 7 - $basearchbaseurl=https://rpm.nodesource.com/pub_5.x/el/7/$basearchfailovermethod=priorityenabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL[nodesource-source]name=Node.js for Enterprise Linux 7 - $basearch - Sourcebaseurl=https://rpm.nodesource.com/pub_5.x/el/7/SRPMSfailovermethod=priorityenabled=0gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-ELgpgcheck=1  I suspect that the problem might be resultimg from having run this other command previously:  curl --silent --location rpm.nodesource.com/setup | bash -I am guessing that the underlying problem is how yum persists the results of those curl --silent --location ... | bash - commands CONTROL CASE: On a different, completely fresh installation of CentOS 7 on a different Virtual Machine, the following three simple commands successfully installed the correct current version 5.x of nodejs:  # cd /tmp# curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -# yum install -y nodejs  # node --versionv5.6.0  These results from the control case indicate that the problem is in how yum is configured in the machine that is having the problem.  So what specific changes need to be made to the machine with the problem so that yum is configured to generate the correct download url?  It is not reasonable to port everything to a different VM.  Surely this is just a line or two in a yum config somewhere that can be changed to resolve this problem.
Why is yum trying to install the wrong version of node.js?
centos;terminal;yum;node.js
This appears to have been a cache issue, though it's unclear what went wrong. After some conversation with the poster in chat, running yum clean all fixed the issue.The poster noted the following:[root@localhost yum]# ls /var/cache/yum/x86_64/7/nodesource/packages nodejs-0.10.42-1nodesource.el7.centos.x86_64.rpm [root@localhost yum]# yum clean all[root@localhost yum]# ls /var/cache/yum/x86_64/7/nodesource/packages [root@localhost yum]# yum install -y nodejs.... much terminal output during successful install[root@localhost yum]# node --versionv5.6.0So the yum clean all deleted the obsolete package that had been stored in the cache.I don't have sufficient knowledge or experience of Red Hat based distributions to say what went wrong here, so will refrain from commenting further.