WSL debian install nodejs

727 ワード

# step 1
# as we known
$ sudo apt update
$ sudo apt upgrade
# step 2
$ sudo apt install build-essential
# install zlib
# get source
$ wget http://www.zlib.net/zlib-1.2.11.tar.gz
# uncompress
$ tar -xvf zlib-1.2.11.tar.gz
$ cd zlib-1.2.11
$ ./configure
# compile
$ make
# install
$ sudo make install

# install python2.7
$ wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz
$ tar -xvf Python-2.7.15.tgz
$ cd Python-2.7.15
$ ./configure
$ make
$ sudo make install
# step 3
# install git
$ sudo apt install git
# clone nodejs from github
$ git clone https://github.com/nodejs/node.git
$ cd node
$ ./configure
$ make && sudo make install