Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 5 installer on Centos7 tries to use 4.x package during yum install #191

MaffooBristol opened this issue Dec 8, 2015 · 11 comments


Copy link

@MaffooBristol MaffooBristol commented Dec 8, 2015

Using setup_5.x tries to find the package nodejs-4.2.3-1nodesource.el7.centos.x86_64 from the URL, which obviously 404s. Any thoughts? Thanks!

[root@PlainBear client]# curl -sL | 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 ''

## Downloading release setup RPM...

+ mktemp
+ curl -sL -o '/tmp/tmp.VV85LqAo7Z' ''

## Installing release setup RPM...

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

## Cleaning up...

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

## Checking for existing installations...

+ rpm -qa 'node|npm' | grep -v nodesource

## Run `apt-get install nodejs` (as root) to install Node.js 5.x and npm

## 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`

[root@PlainBear client]# yum install -y nodejs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * updates:
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 0:4.2.3-1nodesource.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                                 Arch                                    Version                                                          Repository                                   Size
 nodejs                                  x86_64                                  4.2.3-1nodesource.el7.centos                                     nodesource                                  6.7 M

Transaction Summary
Install  1 Package

Total download size: 6.7 M
Installed size: 23 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
nodejs-4.2.3-1nodesource.el7.c FAILED                                  [Errno 14] HTTPS Error 404 - Not Found                             ]  0.0 B/s |    0 B  --:--:-- ETA 
Trying other mirror.

Error downloading packages:
  nodejs-4.2.3-1nodesource.el7.centos.x86_64: [Errno 256] No more mirrors to try.
Copy link

@MaffooBristol MaffooBristol commented Dec 8, 2015

As a bit more detail, I did originally install version 4.x and it worked, then I ran yum remove nodejs -y and tried with 5.x

/etc/yum.repos.d/nodesource-el.repo only shows references to 5.x

Also, it seems to be doing the same thing for the 0.10.x installer.

Copy link

@npeeples npeeples commented Dec 10, 2015

I was seeing the same issue. I was able to fix it though...

su -
yum clean all
yum list nodejs
Copy link

@nweiler nweiler commented Jan 12, 2016

Thanks @neouser99. This fixed my similar problem (node4 installer referencing v5 package.)

Copy link

@Mecanik Mecanik commented Mar 9, 2016

It solved it for me also, many thanks!

Copy link

@retrohacker retrohacker commented Jun 6, 2016

This appears to be solved by cleaning the package manager's cache. Will update the FAQ with this tip which will land in #308

If clearing the cache does not solve your problem, please reopen this issue and we can help debug!

@retrohacker retrohacker closed this Jun 6, 2016
Copy link

@xyalan xyalan commented Aug 10, 2016

It solved.Thanks.

Copy link

@JoeCostanzo JoeCostanzo commented Oct 7, 2016

@MaffooBristol absolutely this is a correct & vital part of the solution.

I was having difficulty booting the latest CentOS kernal, due to a kernal panic. (I had been going into sudo yum update, yum install, and pip install commands on a previous session that may not all have completed).

So I deleted that kernal, while inside the previous kernal version, and went to do yum update to get the newest one installed again.

But I was getting a bunch of errors then related to nodejs transaction conflicts, upon the yum update command.

So how do I get back onto the newest kernal without a kernal panic, and no node transaction conflicts?

I tried yum erase /etc/yum.repos.d/nodesource-el.repo, again from the older kernal. Someone online said that this was the fix and that it would let me get back onto the new kernal! But that didn't solve it!!!!!!!

You have to yum remove nodejs -y, as @MaffooBristol said to wipe out the WHOLE THING APPARENTLY!! Then you can yum update.

Finally sudo shutdown -r 0 to boot to the newest kernal.

Copy link

@ghost ghost commented Dec 1, 2016

On Debian, if apt-get clean still does not help, you should edit the repo source file manually.

vi /etc/apt/sources.list.d/nodesource.list


deb jessie main
deb-src jessie main

Or add the nodejs repo address to your main repo source file directly
vi /etc/apt/sources.list

deb jessie main
deb-src jessie main


apt-get update
apt-get install nodejs
Copy link

@atavakoli atavakoli commented Jun 21, 2017

In my case (CentOS), I was trying to upgrade from 6.11 to 8.x, and 6.11 was being reinstalled instead, despite cleaning the cache. It turned out I had two .repo files with conflicting versions:

  • /etc/yum.repos.d/nodesource-el.repo (contained URL for 6.x)
  • /etc/yum.repos.d/nodesource-el6.repo (contained URL for 8.x)

I think this can happen if you run both setup scripts on the same box, and I could confirm it because the yum install nodejs output contained the lines:

Repository nodesource is listed more than once in the configuration
Repository nodesource-source is listed more than once in the configuration

I was able to fix it by removing the offending .repo file, cleaning, and reinstalling:

rm -f /etc/yum.repos.d/nodesource-el.repo
yum clean all
yum -y remove nodejs
yum -y install nodejs
Copy link

@noam-arad noam-arad commented Feb 6, 2018

@atavakoli Thanks for the advice, same thing happened to me.
I had to add a step to your instructions
yum update
before the install

Copy link

@xinthose xinthose commented Jan 10, 2020

Add the public key if you get an error from apt update:
curl -s | apt-key add -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
10 participants
You can’t perform that action at this time.