distributions: Incorrect version of Node package in Yum repo

  • Version: 4.x
  • Platform: CentOS 6.7

Yum repo for version 4.x do not have NodeJS in version 4.x but instead it has version 0.10.x.

I have followed instructions on https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora and when I run:

> curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -

I get:

## Installing the NodeSource Node.js v4.x LTS Argon 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 "el6-x86_64" is supported...

+ curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_4.x/el/6/x86_64/nodesource-release-el6-1.noarch.rpm'

## Downloading release setup RPM...

+ mktemp
+ curl -sL -o '/tmp/tmp.EvZxJi2VwT' 'https://rpm.nodesource.com/pub_4.x/el/6/x86_64/nodesource-release-el6-1.noarch.rpm'

## Installing release setup RPM...

+ rpm -i --nosignature --force '/tmp/tmp.EvZxJi2VwT'

## Cleaning up...

+ rm -f '/tmp/tmp.EvZxJi2VwT'

## Checking for existing installations...

+ rpm -qa 'node|npm' | grep -v nodesource
XNode.js v4.x LTS Argon == XNode.js v5.x

## Run `yum install -y nodejs` (as root) to install Node.js v4.x LTS Argon and npm.
You may also need development tools to build native addons:
  `yum install -y gcc-c++ make`

However the Node version available to yum is the old one:

 yum --showduplicates --disablerepo=* --enablerepo=nodesource list nodejs

Loaded plugins: fastestmirror, security, versionlock
Loading mirror speeds from cached hostfile
Available Packages
nodejs.x86_64                                                  0.10.31-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.32-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.33-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.34-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.35-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.36-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.38-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.39-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.40-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.41-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.42-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.43-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.44-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.45-1nodesource.el6                                                   nodesource
nodejs.x86_64                                                  0.10.46-1nodesource.el6                                                   nodesource

And when trying to install nodejs package I’m getting:

yum --disablerepo=* --enablerepo=nodesource install nodejs
Loaded plugins: fastestmirror, security, versionlock
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 0:0.10.46-1nodesource.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================
 Package                      Arch                         Version                                          Repository                        Size
===================================================================================================================================================
Installing:
 nodejs                       x86_64                       0.10.46-1nodesource.el6                          nodesource                       5.5 M

Transaction Summary
===================================================================================================================================================
Install       1 Package(s)

Total download size: 5.5 M

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 6
  • Comments: 29 (9 by maintainers)

Most upvoted comments

This work for me, I have to manual remove nodesource repo file:

yum remove nodesource-release* nodejs
yum clean all
rm -rf /var/cache/yum/*
rm /etc/yum.repos.d/nodesource-el.repo

I was having this problem and rm -rf /var/cache/yum/* resolved it for me.

I wanted to add that you can rm -rf /var/cache/yum/*

Also yum clean all will not remove cached files for repo’s that no longer exist which may explain what happened in my case. I had removed the original .10.x repo prior to running yum clean all.

Okay, so it looks like you had a previous version installed, and you also have two of the release files installed, which is probably messing things up. Please try:

yum remove nodesource-release* nodejs
yum clean all

The, check

rpm -qa 'node|npm'

again and make sure there’s nothing there, and then run the installer script again.

Thanks TOO! i made mistake with installation version 8 instead 10 and this solve it: yum remove nodesource-release* nodejs yum clean all rm -rf /var/cache/yum/* rm /etc/yum.repos.d/nodesource-el.repo

Same issue here and clearing the yum cache did the trick

Same problem here, it will install version 6.7.0 instead of version 4.x…

Hello, I also had this problem. I resolved it with a yum clean all and reboot. Performing just a yum clean all did not resolve it - more notes at the bottom

[root@mozdeftest src]# rpm -qa node [root@mozdeftest src]# rpm -qa npm [root@mozdeftest src]# rpm -qa | grep nodesource nodesource-release-el7-1.noarch [root@mozdeftest src]# rpm -qa | grep node nodesource-release-el7-1.noarch [root@mozdeftest src]# yum install nodejs Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile

  • base: repos.lax.quadranet.com
  • epel: mirrors.cat.pdx.edu
  • extras: mirror.hostduplex.com
  • updates: centos.eecs.wsu.edu Resolving Dependencies –> Running transaction check —> Package nodejs.x86_64 0:0.10.46-1nodesource.el7.centos will be installed –> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository Size

Installing: nodejs x86_64 0.10.46-1nodesource.el7.centos nodesource 5.4 M

Transaction Summary

Install 1 Package

Total download size: 5.4 M Installed size: 19 M Is this ok [y/d/N]: N Exiting on user command

I did run yum clean all several times and went as far as to remove any occurrence of node on the system prior to running the script after trying several times with the same result. At this point I opted to manually download the package to install it from the location the script points to.

This morning I got to thinking about this again so decided to try something else. After doing yum clean all and then rebooting the system I reinstalled the repo. Now, when I do a yum list nodejs, I now see the correct packages, as it also lists the 4.6 version as an update.

[root@mozdeftest ~]# yum list nodejs Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile

  • base: repos.lax.quadranet.com
  • epel: ftp.osuosl.org
  • extras: mirror.hmc.edu
  • updates: repo1.sea.innoscale.net

Installed Packages nodejs.x86_64 1:4.5.0-1nodesource.el7.centos @/nodejs-4.5.0-1nodesource.el7.centos.x86_64

Available Packages nodejs.x86_64 1:4.6.0-1nodesource.el7.centos nodesource

Maybe something is broken with Yum’s caching?