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

Closed
MaffooBristol opened this Issue Dec 8, 2015 · 10 comments

Comments

Projects
None yet
9 participants
@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 https://rpm.nodesource.com/pub_5.x/el/7/x86_64/nodejs-4.2.3-1nodesource.el7.centos.x86_64.rpm, which obviously 404s. Any thoughts? Thanks!

[root@PlainBear client]# curl -sL 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.VV85LqAo7Z' '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.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: mirror.vorboss.net
 * epel: www.mirrorservice.org
 * extras: mirror.as29550.net
 * updates: centos.serverspace.co.uk
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
====================================================================================================================================================================================================
Installing:
 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                                          
https://rpm.nodesource.com/pub_5.x/el/7/x86_64/nodejs-4.2.3-1nodesource.el7.centos.x86_64.rpm: [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.
@MaffooBristol

This comment has been minimized.

Show comment
Hide comment
@MaffooBristol

MaffooBristol 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.

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.

@npeeples

This comment has been minimized.

Show comment
Hide comment
@npeeples

npeeples Dec 10, 2015

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

su -
yum clean all
yum list nodejs

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
@nweiler

This comment has been minimized.

Show comment
Hide comment
@nweiler

nweiler Jan 12, 2016

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

nweiler commented Jan 12, 2016

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

@Mecanik

This comment has been minimized.

Show comment
Hide comment
@Mecanik

Mecanik Mar 9, 2016

It solved it for me also, many thanks!

Mecanik commented Mar 9, 2016

It solved it for me also, many thanks!

@retrohacker

This comment has been minimized.

Show comment
Hide comment
@retrohacker

retrohacker Jun 6, 2016

Contributor

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!

Contributor

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

@xyalan

This comment has been minimized.

Show comment
Hide comment
@xyalan

xyalan Aug 10, 2016

It solved.Thanks.

xyalan commented Aug 10, 2016

It solved.Thanks.

@JoeCostanzo

This comment has been minimized.

Show comment
Hide comment
@JoeCostanzo

JoeCostanzo 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.

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.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost 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

Add:

deb https://deb.nodesource.com/node_7.x jessie main
deb-src https://deb.nodesource.com/node_7.x jessie main

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

deb https://deb.nodesource.com/node_7.x jessie main
deb-src https://deb.nodesource.com/node_7.x jessie main

Then:

apt-get update
apt-get install nodejs

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

Add:

deb https://deb.nodesource.com/node_7.x jessie main
deb-src https://deb.nodesource.com/node_7.x jessie main

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

deb https://deb.nodesource.com/node_7.x jessie main
deb-src https://deb.nodesource.com/node_7.x jessie main

Then:

apt-get update
apt-get install nodejs
@atavakoli

This comment has been minimized.

Show comment
Hide comment
@atavakoli

atavakoli 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

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
@noam-arad

This comment has been minimized.

Show comment
Hide comment
@noam-arad

noam-arad 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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment