[英]Help on installing Node.js on Ubuntu 10.04 from terminal?
我正在使用此站点来遵循有关如何安装节点的命令:
https://github.com/joyent/node/wiki/Installation
这部分没有错误:
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
一旦我点击这个命令,我得到了错误
root@tgwizman:/node# ./configure --prefix=$HOME/local/node
Checking for program g++ or c++ : not found
Checking for program icpc : not found
Checking for program c++ : not found
/node/wscript:228: error: could not configure a cxx compiler!
我应该怎么做才能获得 cxx 编译器?
您应该能够在终端中运行以下命令:
sudo apt-get update
sudo apt-get install build-essential
(另外,阅读https://help.ubuntu.com/community/CompilingSoftware了解更多背景信息等)
您缺少编译器。
只需输入:
sudo apt-get install g++
本指南应有尽有。
http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/
在ubuntu
,我更喜欢通过nvm
安装nodejs
,这对我来说效果最好,此外它还允许您切换经常需要的nodejs
的多个版本。
安装示例:
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
这是一个完整的指南,逐步介绍如何在 Ubuntu 10.04 上设置 nodejs
http://blog.markmirandilla.com/2012/12/14/how-to-setup-node-js-in-ubuntu-10-04/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.