I have this:
RUN curl -sL | sudo -E bash -
RUN apt-get install -y nodejs=11but 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.
03 Answers
Because 12 is already installed, I had to do this:
# apt-get remove -y nodejs # key part
# curl -sL | sudo -E bash -
# apt-get install -y nodejs just drop that =11 part. Like this:
sudo apt install nodejsand
node -v
v11.15.0The reason is that first curl command installs the repository which replaces apt's pointer for nodejs - so no need to specify the version.
try like this:
curl -sL | sudo -E bash -
sudo apt-get install -y nodejsthe only problem that I see is the "nodejs=11" in the apt-get, that should do it.
You can find the versions here:
The stable version is currently the 10.x
2