[英]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.