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 js package install for 7.x tries to install 6.9.5 for CentOS #421

Closed
davidmcl opened this issue Feb 16, 2017 · 6 comments
Closed

Node js package install for 7.x tries to install 6.9.5 for CentOS #421

davidmcl opened this issue Feb 16, 2017 · 6 comments

Comments

@davidmcl
Copy link

It looks to be pointing at the wrong version.

using...
curl --silent --location https://rpm.nodesource.com/setup_7.x | bash -

... the following occurs for Centos7; with 6.9.5 already installed (and errors out if not):

[root@meta ~]# curl -sL https://rpm.nodesource.com/setup_7.x | bash -

## Installing the NodeSource Node.js 7.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_7.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'

## Downloading release setup RPM...

+ mktemp
+ curl -sL -o '/tmp/tmp.r9DrseAjR3' '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.r9DrseAjR3'

## Cleaning up...

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

## 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@meta ~]# yum install -y nodejs
Loaded plugins: fastestmirror, langpacks
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
 * base: mirror.millry.co
 * epel: mirror.math.princeton.edu
 * extras: denver.gaminghost.co
 * updates: mirror.math.princeton.edu
Package 2:nodejs-6.9.5-1nodesource.el7.centos.x86_64 already installed and latest version
Nothing to do
[root@meta ~]# 

Thanks,
David

@chrislea
Copy link
Contributor

Hrm, not immediately sure what's going on here. Did you previously have v6.x installed from our repositories? Also, can you let us know the output of:

[root@meta ~]# cat /etc/yum.repos.d/nodesource*

@davidmcl
Copy link
Author

FYI, making sure that wasn't some weird quirk of the particular VM, I fired up a VM I knew nodejs hadn't been installed on; installed v7.5 and installed OK

Then I fired another up with no previous nodejs...

  • installed v6 - OK
  • installed v7 - it again tried to re-install v6.9.5, same messages as in previous post

re: Did you previously have v6.x installed from our repositories? Yes.

re: cat /etc/yum.repos.d/nodesource*

Not sure if it's normal but there are two nodesource entries in the directory

[root@meta ~]# ll /etc/yum.repos.d/nodesource*
-rw-r--r-- 1 root root 472 Oct 21 20:30 /etc/yum.repos.d/nodesource-el7.repo
-rw-r--r-- 1 root root 472 Apr 26 2016 /etc/yum.repos.d/nodesource-el.repo

... and here are contents...

[root@meta ~]# cat /etc/yum.repos.d/nodesource*
[nodesource]
name=Node.js Packages for Enterprise Linux 7 - $basearch
baseurl=https://rpm.nodesource.com/pub_7.x/el/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL

[nodesource-source]
name=Node.js for Enterprise Linux 7 - $basearch - Source
baseurl=https://rpm.nodesource.com/pub_7.x/el/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
gpgcheck=1
[nodesource]
name=Node.js Packages for Enterprise Linux 7 - $basearch
baseurl=https://rpm.nodesource.com/pub_6.x/el/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL

[nodesource-source]
name=Node.js for Enterprise Linux 7 - $basearch - Source
baseurl=https://rpm.nodesource.com/pub_6.x/el/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
gpgcheck=1
[root@meta ~]# 

It's midnight here, so off to bed - will check back in the (later) morning.

Thanks,
David

@xx7y7xx
Copy link

xx7y7xx commented Jul 28, 2017

This would fix the problem

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

According to #191 (comment)

See also: #410 (comment)

@vasconce7os
Copy link

It's works for me @xxd3vin, thank you.

@chrislea
Copy link
Contributor

chrislea commented Aug 1, 2018

Closing.

@chrislea chrislea closed this as completed Aug 1, 2018
@METWebServer
Copy link

Hi,

I had the same issue and your solution is the only one that works.

Thank you @xxd3vin !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants