Building Node.js v22.12.0 for RISC-V

I have just realized that I had already built node.js from source before I installed jupyter lab. This means my instructions for installing jupyter lab might fail if you don't have a current version of node.js. So here are instructions to build and verify it. Be aware it was a long compile time.



# 1. Install dependencies
sudo apt update
sudo apt install -y git build-essential libssl-dev python3

# 2. Clone and checkout specific version
git clone https://github.com/nodejs/node.git
cd node
git checkout v22.12.0  # Specific stable version

# 3. Build and install
./configure --prefix=/usr/local
make -j4  # Adjust for your CPU cores
sudo make install

# 4. Verify
node --version  # Should show v22.12.0
npm --version
2 Likes

If you run sudo apt-get build-dep nodejs before the configure step, it should pick up all the other dependencies and such that a distribution-provided node gets you. I don’t know how much it’ll matter – for some reason it gives me a lot of perl libraries.

1 Like

Thanks for your advice. I have hacking my way through the jungle trying to get a development system going. So far, I have got LLVM, Jupyter lab, Jupyter AI connected back to my laptop via ollama. I built faiss and got it running. I got scikit-learn installed but not tested. Building pytorch as we speak.

1 Like