如何编译/安装 node.js(无法配置 cxx 编译器!)(Ubuntu). [英] How to compile/install node.js(could not configure a cxx compiler!) (Ubuntu).

查看:35
本文介绍了如何编译/安装 node.js(无法配置 cxx 编译器!)(Ubuntu).的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Ubuntu 上编译/安装 node.js?它因 cxx 编译器 的错误而失败.

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

推荐答案

One-liner 安装所有需要的依赖项(curl 和 git 不是真正需要的,但非常有用,如果你也需要通过 nvm 安装).

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.

只安装cxx编译器

sudo apt-get install build-essential

如果 openssl 缺失

sudo apt-get install libssl-dev

这篇关于如何编译/安装 node.js(无法配置 cxx 编译器!)(Ubuntu).的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆