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

前端 未结 7 1154
盖世英雄少女心
盖世英雄少女心 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 07:37

    I needed to run yum install gcc-c++ on Cent OS.

    0 讨论(0)
  • There is a package for it on launchpad.
    https://launchpad.net/~chris-lea/+archive/node.js/

    0 讨论(0)
  • 2020-12-02 07:54

    If you're attempting this on Win7 like me, running:

    ash.exe
    $ /bin/rebaseall
    

    ...did the trick.

    Good luck!

    0 讨论(0)
  • 2020-12-02 07:55

    One-liner to install all needed dependencies(curl and git are not really needed, but are very useful and also needed if you install via nvm).

    sudo apt-get install build-essential libssl-dev curl git-core
    

    Last two dependencies are not always needed, but installing them is really usefull anyway and you probably need it later anyway.

    To only install cxx compiler

    sudo apt-get install build-essential
    

    If openssl is missing

    sudo apt-get install libssl-dev
    
    0 讨论(0)
  • 2020-12-02 08:01

    If like me, you are attempting to install this on an AWS instance running Amazon Linux AMI (which looks to be a cut down version CentOS):

    Install base tools:

    yum groupinstall "Development Tools"

    Now install openssl-devel:

    yum install openssl-devel

    Node should compile fine now.

    0 讨论(0)
  • 2020-12-02 08:02

    If you find yourself getting this error on Mac OSX, you need to install XCode.

    https://developer.apple.com/

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