ubuntu 下安装node

sudo apt-get update
sudo apt-get install build-essential -y
sudo apt-get install git -y

Node.js itself requires very little in the way of dependencies.

  • python - Version 2.6 or 2.7.
  • libssl-dev - You will need this if you plan to use SSL/TLS encryption.
  • sudo apt-get install python libssl-dev -y
    cd /usr/local/src
    
    
    1、
    sudo mkdir node
    cd node
    sudo wget http://nodejs.org/dist/v0.6.17/node-v0.6.17.tar.gz
    sudo tar -xzvf node-v0.6.17.tar.gz
    cd node-v0.6.17
    sudo ./configure
    2、
    cd /usr/local/src
    sudo git clone git://github.com/joyent/node.git
    cd node
    sudo git checkout v0.6.17
    sudo ./configure
    sudo make
    sudo make install
    cd /usr/local/src/node
    sudo git checkout master
    sudo git pull origin master
    sudo git checkout vx.x.x
    sudo ./configure
    sudo make
    sudo make install
    mkdir -p ~/local/src
    cd ~/local/src
    git clone git://github.com/joyent/node.git
    cd node
    git checkout v0.6.17
    ./configure --prefix=~/local
    make
    make install

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。