1

I used Homebrew to install Node on Ubuntu 16.04.4 LTS:

brew install node

I'd like to use NodeJS version 18.8.0 or higher up to <20.0.0.

I therefore ran:

nvm install 18.18.2

However, I can't seem to get my desired NodeJS version:

user@server:~/test$ nvm use 18.18.2
Now using node v18.18.2 (npm v10.9.2)
user@server:~/test$ nvm --version
0.40.1
user@server:~/test$ node --version
v23.7.0

Here is the list of install NVM versions:

user@server:~/test$ nvm ls
       v14.15.5
       v16.20.2
       v18.18.2
->       system

default -> node (-> v18.18.2)
iojs -> N/A (default)
unstable -> N/A (default)
node -> stable (-> v18.18.2) (default)
stable -> 18.18 (-> v18.18.2) (default)
lts/* -> lts/jod (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.17.0 (-> N/A)
lts/dubnium -> v10.24.1 (-> N/A)
lts/erbium -> v12.22.12 (-> N/A)
lts/fermium -> v14.21.3 (-> N/A)
lts/gallium -> v16.20.2
lts/hydrogen -> v18.20.7 (-> N/A)
lts/iron -> v20.18.3 (-> N/A)
lts/jod -> v22.14.0 (-> N/A)
4
  • 16.04 EOL March 2021 ... get something current/maintained? Commented Feb 21 at 7:39
  • @tink not an option Commented Feb 21 at 7:39
  • Why is that? I mean ... no security updates in 4 almost years? Is that an embedded system never exposed to the great unwashed? Commented Feb 21 at 7:55
  • @tink sometimes got to work on old OS, that's life, not doing it for fun Commented Feb 21 at 7:56

1 Answer 1

0

The following fixed the issue:

brew uninstall node
brew install nvm
nvm use 18.18.2
brew install glibc
echo 'export PATH="/home/linuxbrew/.linuxbrew/opt/glibc/bin:$PATH"' >> ~/.profile
echo 'export PATH="/home/linuxbrew/.linuxbrew/opt/glibc/sbin:$PATH"' >> ~/.profile
source ~/.profile

Now I get:

user@server:~/horizon/hz$ node --version
v18.20.6

Note: I first tried to solve the issue by running

brew uninstall node
brew install node@18

but that gave me the error:

node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by node)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.