Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing a tar.gz on Linux

Tags:

linux

node.js

I have downloaded Node.js from this link, which points to this link when clicking the button:

https://nodejs.org/dist/v4.1.2/node-v4.1.2-linux-x64.tar.gz

As advice from the Ubuntu community on installing the tar.gz, the following steps are followed.

$ ./configure $ make $ [sudo] make install 

The problem is the current file I have downloaded does not contain ./configure.

So how do I install this? Should I extract this to the usr/ folder?

My OS is Debian 8 (Jessie).

Should I include the Java package from Oracle? Is it safe to extract these files to the /usr folder?

like image 740
user101 Avatar asked Oct 09 '15 08:10

user101


People also ask

How do I open a Tar gz file in Linux?

Simply right-click the item you want to compress, mouseover compress, and choose tar. gz. You can also right-click a tar. gz file, mouseover extract, and select an option to unpack the archive.


1 Answers

You can download this file from the browser or from the console. The latter is shown below (note: the specific Node.js version might be different for you):

Example :

wget http://nodejs.org/dist/v8.1.1/node-v8.1.1-linux-x64.tar.gz

sudo tar -C /usr/local --strip-components 1 -xzf node-v8.1.1-linux-x64.tar.gz

 #tar options:   -x, --extract, --get    extract files from an archive   -f, --file ARCHIVE    use archive file or device ARCHIVE   -z, --gzip, --gunzip --ungzip` 

You may find list of node version on http://nodejs.org/dist/

You should now have both Node.js and npm installed in “/usr/local/bin”. You can check this typing:

ls -l /usr/local/bin/node ls -l /usr/local/bin/npm

*An alternative way to install Node.js via the package manager:

Installing Node.js via package manager

like image 75
Nullpointer Avatar answered Oct 04 '22 13:10

Nullpointer