How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).

前端 未结 7 1155
盖世英雄少女心
盖世英雄少女心 2020-12-02 07:25

How can I compile/install node.js on Ubuntu? It failed with an error about cxx compiler.

相关标签:
7条回答
  • 2020-12-02 08:03

    For Node.js v6:

    curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    sudo apt-get install -y nodejs
    

    For Node.js v7:

    curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
    sudo apt-get install -y nodejs
    

    Optional: install build tools To compile and install native addons from npm you may also need to install build tools:

    sudo apt-get install -y build-essential
    

    After to get latest NPM packages, if you need:

    npn update -g
    

    Partial source here.

    0 讨论(0)
提交回复
热议问题