【问题标题】:Help on installing Node.js on Ubuntu 10.04 from terminal?帮助从终端在 Ubuntu 10.04 上安装 Node.js?
【发布时间】:2011-10-27 09:16:45
【问题描述】:

我正在使用这个网站来遵循如何安装节点的命令:

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 编译器?

【问题讨论】:

    标签: ubuntu node.js installation terminal


    【解决方案1】:

    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
    

    【讨论】:

      【解决方案2】:

      这是一个完整的指南,一步一步介绍如何在 Ubuntu 10.04 上设置 nodejs

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

      【讨论】:

        【解决方案3】:

        您缺少编译器。

        只需输入:

        sudo apt-get install g++
        

        本指南应有尽有。

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

        【讨论】:

          【解决方案4】:

          您应该能够在终端中运行以下命令:

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

          (另外,阅读https://help.ubuntu.com/community/CompilingSoftware 了解更多背景信息等)

          【讨论】:

          • 有谁知道如何在 Fedora 16 上安装它?我试过这个没有运气... [agile@453D05J node-v0.10.15]$ sudo yum install g++ 加载的插件:langpacks、presto、refresh-packagekit 没有可用的包 g++。错误:无事可做 [agile@453D05J node-v0.10.15]$
          • 对不起... 典型:找到答案,我找到答案,我需要安装$ sudo yum install gcc-c++
          猜你喜欢
          • 2012-08-17
          • 1970-01-01
          • 1970-01-01
          • 2011-07-30
          • 1970-01-01
          • 1970-01-01
          • 2012-06-24
          • 2011-08-30
          • 2011-05-08
          相关资源
          最近更新 更多