I have inherited a CentOS server where nodejs is installed from epel repository. However, I need a specific version of it, so I've installed nodejs repository but I can't update it from the new repository since it tells me the following:
Loaded plugins: fastestmirror
nodesource | 2.5 kB 00:00:00
nodesource/x86_64/primary_db | 38 kB 00:00:00
Loading mirror speeds from cached hostfile
* base: ftp.freepark.org
* epel: mirror.imt-systems.com
* extras: ftp.freepark.org
* remi: mirror.23media.de
* remi-php56: mirror.23media.de
* remi-safe: mirror.23media.de
* updates: ftp.freepark.org
Resolving Dependencies
--> Running transaction check
---> Package npm.x86_64 1:3.10.10-1.6.9.4.2.el7 will be updated
---> Package npm.x86_64 1:3.10.10-1.6.10.1.2.el7 will be an update
--> Processing Dependency: nodejs = 1:6.10.1-2.el7 for package: 1:npm-3.10.10-1.6.10.1.2.el7.x86_64
--> Running transaction check
---> Package nodejs.x86_64 1:6.9.4-2.el7 will be updated
--> Processing Dependency: nodejs(x86-64) = 1:6.9.4-2.el7 for package: 1:nodejs-devel-6.9.4-2.el7.x86_64
---> Package nodejs.x86_64 1:6.10.1-2.el7 will be an update
--> Running transaction check
---> Package nodejs-devel.x86_64 1:6.9.4-2.el7 will be updated
---> Package nodejs-devel.x86_64 2:6.10.2-2nodesource.el7.centos will be an update
--> Processing Dependency: nodejs(x86-64) = 2:6.10.2-2nodesource.el7.centos for package: 2:nodejs-devel-6.10.2-2nodesource.el7.centos.x86_64
epel/x86_64/filelists_db | 7.7 MB 00:00:00
--> Running transaction check
---> Package nodejs.x86_64 1:6.9.4-2.el7 will be updated
---> Package nodejs.x86_64 1:6.9.4-2.el7 will be updated
---> Package nodejs.x86_64 1:6.10.1-2.el7 will be an update
--> Processing Dependency: nodejs = 1:6.10.1-2.el7 for package: 1:npm-3.10.10-1.6.10.1.2.el7.x86_64
---> Package nodejs.x86_64 2:6.10.2-2nodesource.el7.centos will be an update
--> Finished Dependency Resolution
Error: Package: 1:npm-3.10.10-1.6.10.1.2.el7.x86_64 (epel)
Requires: nodejs = 1:6.10.1-2.el7
Removing: 1:nodejs-6.9.4-2.el7.x86_64 (@epel)
nodejs = 1:6.9.4-2.el7
Updated By: 2:nodejs-6.10.2-2nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.10.2-2nodesource.el7.centos
Available: nodejs-6.0.0-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 6.0.0-1nodesource.el7.centos
Available: nodejs-6.1.0-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 6.1.0-1nodesource.el7.centos
Available: nodejs-6.2.0-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 6.2.0-1nodesource.el7.centos
Available: nodejs-6.2.1-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 6.2.1-1nodesource.el7.centos
Available: nodejs-6.2.2-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 6.2.2-1nodesource.el7.centos
Available: 1:nodejs-6.3.0-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 1:6.3.0-1nodesource.el7.centos
Available: 1:nodejs-6.3.1-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 1:6.3.1-1nodesource.el7.centos
Available: 1:nodejs-6.4.0-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 1:6.4.0-1nodesource.el7.centos
Available: 1:nodejs-6.6.0-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 1:6.6.0-1nodesource.el7.centos
Available: 1:nodejs-6.7.0-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 1:6.7.0-1nodesource.el7.centos
Available: 1:nodejs-6.10.1-2.el7.x86_64 (epel)
nodejs = 1:6.10.1-2.el7
Available: 2:nodejs-6.8.0-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.8.0-1nodesource.el7.centos
Available: 2:nodejs-6.8.1-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.8.1-1nodesource.el7.centos
Available: 2:nodejs-6.9.0-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.9.0-1nodesource.el7.centos
Available: 2:nodejs-6.9.1-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.9.1-1nodesource.el7.centos
Available: 2:nodejs-6.9.2-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.9.2-1nodesource.el7.centos
Available: 2:nodejs-6.9.3-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.9.3-1nodesource.el7.centos
Available: 2:nodejs-6.9.4-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.9.4-1nodesource.el7.centos
Available: 2:nodejs-6.9.5-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.9.5-1nodesource.el7.centos
Available: 2:nodejs-6.10.0-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.10.0-1nodesource.el7.centos
Available: 2:nodejs-6.10.1-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.10.1-1nodesource.el7.centos
Available: 2:nodejs-6.10.2-1nodesource.el7.centos.x86_64 (nodesource)
nodejs = 2:6.10.2-1nodesource.el7.centos
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
How would you resolve this issue?
the repo is incomplete upstream. It's listing incompatible versions for different portions of the dependency calculation. This is a SELF-INFLICTED condition known as Dependency Hell. It happens when you mix janky third-party repositories. As well, please really understand that installing third-party stuff opens you to a vast hell of support issues, security issues, and vanishing packages issues. Please seriously reconsider whether this week's release of something is going to be worth so much of your time in a permanent fashion, and consider whether you really want to greenfield over to a shiny new c7 host instead.
Have a look inside
/etc/yum.repos.d/
directory (ls /etc/yum.repos.d/
) you will probably see something likenodesource-el7.repo
. Run the following commands:Now
yum repolist
command should not havenodesource-el7.repo
in the displayed list.Lets install nodejs and npm
(the 8.x above, can be 9.x or 10.x, or whatever version of node you want)
Lets check our installation
(Hopefully) Victory!