开发者

Help on installing Node.js on Ubuntu 10.04 from terminal?

I was using this site to follow the commands on how to install node:

https://github.com/joyent/node/wiki/Installation

This part had no errors:

git clone --depth 1 git://github.com/joyent/node.git # or git clone git://github.com/joyent/node.git if you want to checkout a stable tag
cd node
git checkout v0.4.10 # optional.  Note that master is unstable.
export JOBS=2 # optional, sets number of parallel commands.
mkdir ~/local

Once I hit this command, I got the error

root@tgwizman:/node# ./configure --prefix=$HOME/local/node
Checking for program g++ or c++          : not found 
Checking for program icpc                : not found 开发者_JAVA百科
Checking for program c++                 : not found 
/node/wscript:228: error: could not configure a cxx compiler!

What should I do to get a cxx compiler?


You should just be able to run the following in a terminal:

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

(Also, have a read of https://help.ubuntu.com/community/CompilingSoftware for a bit more background info, etc.)


You are missing the compiler.

Just enter:

sudo apt-get install g++

This guide has it all.

http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/


On ubuntu I prefer to install nodejs via nvm, this has worked for me best and additionally it will allow you to toggle multiple version of nodejs which is frequently needed.

example installation:

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
command -v nvm
nvm install node
nvm use node
nvm run node --version


Here is a complete guide, step by step on how to setup nodejs on Ubuntu 10.04

http://blog.markmirandilla.com/2012/12/14/how-to-setup-node-js-in-ubuntu-10-04/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜