0

I use the script from the official site to install nodejs 6_x:

wget -qO- https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs

and see this output:

Run sudo apt-get install -y nodejs to install Node.js 6.x LTS Boron and npm

Why do I get nodejs 8_10 instead?

root@ip-172-31-42-193:/home/ubuntu# nodejs --version
v8.10.0

1 Answer 1

1

I found out that Ubuntu 18.04 already has nodejs 8_10 in its apt repository.

root@ip-172-31-18-129:/home/ubuntu# apt-cache policy nodejs
nodejs:
  Installed: 6.14.1-1nodesource1
  Candidate: 8.10.0~dfsg-2ubuntu0.3
  Version table:
     8.10.0~dfsg-2ubuntu0.3 500
        500 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
     8.10.0~dfsg-2ubuntu0.2 500
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
     8.10.0~dfsg-2 500
        500 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
 *** 6.14.1-1nodesource1 500
        500 https://deb.nodesource.com/node_6.x bionic/main amd64 Packages
        100 /var/lib/dpkg/status

I installed the specific version I wanted by:

apt-get install nodejs=6.14.1-1nodesource1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.