RHEL 8 nodejs conflicts with JupyterHub-needed repos: nodesource-nodejs/nodesource-nsolid

On RHEL 8 running dnf install ondemand --best --allowerasing results in the following conflicts. The server also runs JupyterHub which needed these 2 repos:

-rw-r--r--  1 root root   262 Mar  5 09:27 nodesource-nodejs.repo
-rw-r--r--  1 root root   262 Mar  5 09:27 nodesource-nsolid.repo

I’ve set enabled=0 on those 2. I also ran into the conflicts mentioned here.

 Problem: package ondemand-3.1.1-1.el8.x86_64 from ondemand-web requires ondemand-nodejs = 3.1.5-1.el8, but none of the providers can be installed
  - cannot install the best candidate for the job
  - nothing provides nodejs >= 1:18.0 needed by ondemand-nodejs-3.1.5-1.el8.x86_64 from ondemand-web
  - nothing provides nodejs < 1:19.0 needed by ondemand-nodejs-3.1.5-1.el8.x86_64 from ondemand-web
  - nothing provides npm needed by ondemand-nodejs-3.1.5-1.el8.x86_64 from ondemand-web

Is there a way around this?

Hi and welcome.

Sorry for the trouble with the install. What version of nodejs are you using?

You may want to checkout the dependency updates if you haven’t yet:

I uninstalled it:

rpm -qa|grep -i node
nodesource-release-el8-1.noarch

Which ones are you referring to? You quoted this discussion.

It’s likely a conflict from these instructions for JupyterHub:

# install nodejs and npm
curl –sL https://rpm.nodesource.com/setup_10.x | sudo bash -; yum install –y nodejs 

# install configurable-http-proxy
npm install -g configurable-http-proxy install

But what’s the fix?

I’m not sure of a fix from the current situation.

It looks like you simply have the wrong version of nodejs installed. The dependencies state 18 is needed. But, setup_10.x looks to be nodejs 10 not 18:

#!/bin/bash
...
# Script to install the NodeSource Node.js 10.x repo onto an
# Enterprise Linux or Fedora Core based system.
...

Try again with setup_18.x and see if that gives you better luck.

Ah yes I checked my cmd history:

curl –sL https://rpm.nodesource.com/setup_18.x | sudo bash -; yum install  nodejs -y
curl: (3) Failed to convert –sL to ACE; string contains a disallowed character

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3233  100  3233    0     0  23772      0 --:--:-- --:--:-- --:--:-- 23772
2024-03-05 17:38:57 - Cleaning up old repositories...
2024-03-05 17:38:57 - Old repositories removed
2024-03-05 17:38:57 - Supported architecture: x86_64
2024-03-05 17:38:57 - Added N|Solid repository for LTS version: 18.x
2024-03-05 17:38:57 - dnf available, updating...
Updating Subscription Management repositories.
Node.js Packages for Linux RPM based distros - x86_64                                                       3.6 MB/s | 810 kB     00:00    
N|Solid Packages for Linux RPM based distros - x86_64                                                       787 kB/s | 172 kB     00:00    
Metadata cache created.
2024-03-05 17:38:59 - Repository is configured and updated. Run 'dnf install nodejs -y' to complete the installation.
Updating Subscription Management repositories.
Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs)                                                     24 kB/s | 2.8 kB     00:00    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                                                        26 kB/s | 2.4 kB     00:00    
Dependencies resolved.
============================================================================================================================================
 Package                   Architecture              Version                                     Repository                            Size
============================================================================================================================================
Installing:
 nodejs                    x86_64                    2:18.19.1-1nodesource                       nodesource-nodejs                     34 M

Transaction Summary
============================================================================================================================================
Install  1 Package

Total download size: 34 M
Installed size: 100 M
Downloading Packages:
nodejs-18.19.1-1nodesource.x86_64.rpm                                                                        36 MB/s |  34 MB     00:00    
--------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                        36 MB/s |  34 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                    1/1 
  Running scriptlet: nodejs-2:18.19.1-1nodesource.x86_64                                                                                1/1 
  Installing       : nodejs-2:18.19.1-1nodesource.x86_64                                                                                1/1 
  Running scriptlet: nodejs-2:18.19.1-1nodesource.x86_64                                                                                1/1 
  Verifying        : nodejs-2:18.19.1-1nodesource.x86_64                                                                                1/1 
Installed products updated.

Installed:
  nodejs-2:18.19.1-1nodesource.x86_64

Now I get the ling list of nsolid errors I mentioned on the npm git:

 dnf install ondemand
Updating Subscription Management repositories.
Red Hat CodeReady Linux Builder for RHEL 8 x86_64 (RPMs)                                                     30 kB/s | 2.8 kB     00:00    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                                                        33 kB/s | 2.4 kB     00:00    
Error: 
 Problem: package ondemand-nodejs-3.1.5-1.el8.x86_64 from ondemand-web requires nodejs < 1:19.0, but none of the providers can be installed
  - package nsolid-18.18.2-ns5.0.0.x86_64 from nodesource-nsolid conflicts with nodejs provided by nodejs-2:18.0.0-1nodesource.x86_64 from nodesource-nodejs
  - package nsolid-18.19.0-ns5.0.1.x86_64 from nodesource-nsolid conflicts with nodejs provided by nodejs-2:18.0.0-1nodesource.x86_64 from nodesource-nodejs
  - package nsolid-18.19.0-ns5.0.2.x86_64 from nodesource-nsolid conflicts with nodejs provided by nodejs-2:18.0.0-1nodesource.x86_64 from nodesource-nodejs
[...]

It seems like they have a dependency conflict where the nodejs versions don’t match up. I really don’t know how to solve that as you are trying to install both OOD which I do know about, and JupyterHub which i don’t know about, on the same server.

Are you able to install these on different servers/vm’s?

Yes we have an older version on another cluster but I’m trying to get these both working on the same server for testing purposes.

I think segmentation is the only way forward here. You are trying to install these 2 pieces of software and they have fundamentally different requirements and there’s just no way around that unfortunately.