Install / downgrade specific version of Node.js

10,049

Because 12 is already installed, I had to do this:

# apt-get remove -y nodejs  # key part
# curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
# apt-get install -y nodejs
Share:
10,049

Related videos on Youtube

Alexander Mills
Author by

Alexander Mills

Updated on September 18, 2022

Comments

  • Alexander Mills
    Alexander Mills almost 2 years

    I have this:

    RUN curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
    RUN apt-get install -y nodejs=11
    

    but I get:

    E: Version '11' for 'nodejs' was not found

    I also tried:

    RUN apt-get install -y nodejs=11*
    

    does anyone know how I can find out which versions are available? The problem is that node version 12 is already installed on this machine and I want to downgrade the Node.js version here.

  • Alexander Mills
    Alexander Mills almost 5 years
    see my answer, I had to remove the previous version
  • Alexander Mills
    Alexander Mills almost 5 years
    see my answer, I had to remove the previous version
  • Raphael
    Raphael almost 5 years
    Oh sorry, glad you managed to solve it!
  • Shachar Har-Shuv
    Shachar Har-Shuv over 4 years
    This does not answer the question, as a specific version was requested.