How to change to an older version of Node.js
#1
I'm currently dealing with an issue where I need to use an older version of Node.js. Specifically, I need to roll back to v0.5.0-pre from v0.5.9-pre on my Ubuntu 10.10 system. I understand that it might involve completely uninstalling the current version and then installing the desired version, but I haven't been able to successfully get it to work yet. Here's what I've tried so far:


I removed the current version without any issues, but when it comes to installing an older version, I'm stuck. I was unable to find the specific version in the repository or a suitable binary. Does anyone know how I can compile v0.5.0-pre from source or find a binary that will work on Ubuntu 10.10?
Reply
#2
Firstly, you won't find old pre-release versions of Node.js in official repositories, as they typically only contain stable releases. To install that specific pre-release version, you'll need to compile it from source. Here's how you can do it:
Start by downloading the Node.js v0.5.0-pre source code from the official Node.js GitHub repository. Then you can compile and install it with the following commands:

Code:
make
sudo make install

Make sure you've got the necessary build tools installed; If not, you'll have to install them using:

Code:
sudo apt - get install build - essential

Let me know if you run into any issues during the compilation.
Reply
#3
After following your instructions to compile the source, I encountered several errors related to missing dependencies during the `./configure` step. It seems there are some additional development libraries needed.
Reply
#4
That's correct. You'll need a few more dependencies to compile Node.js. Here's a general list of what you might need to install:

Code:
sudo apt - get install libssl - dev

Once you install these, run the `./configure` script again followed by `make` and `sudo make install`. That should sort out any compilation issues you're facing.
Reply
#5
The dependencies were indeed the issue. After installing them, I was able to compile and install Node.js v0.5.0-pre successfully. For anyone else who may need this in the future, here are the final steps all together:

Code:
sudo apt - get update
sudo apt - get install build - essential python g++make checkinstall fakeroot libssl - dev
# Download and unpack Node.js v0 .5 .0 - pre
wget https: //github.com/nodejs/node/archive/v0.5.0-pre.tar.gz
    tar - zxf v0 .5 .0 - pre.tar.gz
cd node - 0.5 .0 - pre
# Compile and install Node.js
    . / configure
make
sudo make install

Ensure that you have a backup and are aware of the potential risks of using a pre-release and outdated version of Node.js before proceeding.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)