If you’re like me, you prefer to install Linux packages via the systems package manager. By doing so, whenever you run your update command, you’re going to get the most current copy of everything. Unfortunately, Debian doesn’t seem to have Node.js in their package repo by default:
$ sudo apt-get install nodejs Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package nodejs
Oh no! Thankfully, we can download the package source and compile it that way. Unlike a lot of tarballs I’ve used throughout the years, I’ve yet to have a hitch compiling Node on any of my Debian machines.
Run the following commands to get Node.js installed on your machine. In my example I’m grabbing the latest, v0.8.16, but you’ll want to visit the download page and get the URL of the most current version.
$ sudo apt-get install build-essential $ wget http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz $ tar -xzf node-v0.8.16.tar.gz $ cd node-v0.8.16/ $ ./configure $ make $ sudo make install
If everything went as plan, you should have both node and npm installed and ready to go:
$ node -v v0.8.16 $ npm -v 1.1.69
Latest posts by Thomas Hunter II (see all)
- Upgrading from an XPS 13 (9350) to a Carbon X1 5th Gen - 2017-10-03
- What have I been up to? Late 2017 Edition - 2017-09-28
- Is it time to replace REST with RPC? - 2017-09-27