[EN] Node.js on Raspberry Pi

This article is an installation note to run Node.js on a Raspberry Pi 4 on Ubuntu Linux 20.10 as a system for further use.

Equipment

  1. Raspberry Pi 4
  2. micro sd-card
  3. Image program for writing Ubuntu image to micro sd-card.
  4. Ubuntu image

Steps

  1. Download the image writing program (as shown in figure 1) and install it on your computer.
  2. ดาวน์โหลดไฟล์ preinstall of Ubuntu Desktop 20.10 (as figure 2)
  3. Run the program to write the image (from 1st step) and choose to write the downloaded file from 2nd step to miro sd-card.
  4. Insert the micro sd-card into the Raspberry pi 4 and start the installation.
  5. Once the installation is complete, go to the terminal program and execute the command to install Node.js as shown in the 3rd picture.
  6. Install the Node.js installation source (Installing the NodeSource Node.js 14.x repo…) as follows:
    curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash –
  7. Install the following tools
    sudo apt-get install gcc g++ make
  8. Install Node.js with the following command.
    sudo apt-get install -y nodejs
  9. Verify the installation result by showing the installed version with the following command. The installation process of Node.js is complete (example result is shown in Figure 4).
    node –version
    npm –version
(Figure. 1 rpi-image webpage)
(Figure. 2 download page of Ubuntu Desktop 20.10)
(Figure. 3 terminal)
(Figure. 4 result from step 8 and 9)

Conclusion

From this article, you can install Node.js on their Raspberry pi 4 running Ubuntu Desktop 20.10 and ready for further programming. Finally, have fun with programming.

(C) 2020, By Jarut Busarathid and Danai Jedsadathitikul
Updated 2021-09-18