Building Node.js出现错误:Node.js配置错误:未找到可接受的C编译器
在尝试使用Ubuntu 14.04系统为ARM交叉编译Node.js v0.10.30(Raspberry Pi B)时,我遇到一条错误消息:Building Node.js出现错误:Node.js配置错误:未找到可接受的C编译器,node.js,compiler-construction,arm,raspberry-pi,cross-compiling,Node.js,Compiler Construction,Arm,Raspberry Pi,Cross Compiling,在尝试使用Ubuntu 14.04系统为ARM交叉编译Node.js v0.10.30(Raspberry Pi B)时,我遇到一条错误消息: Node.js configure error: No acceptable C compiler found! Please make sure you have a C compiler installed on your system and/or consider adjusting the CC environ
Node.js configure error: No acceptable C compiler found!
Please make sure you have a C compiler installed on your system and/or
consider adjusting the CC environment variable if you installed
it in a non-standard prefix.
如何解决此问题并成功编译node.js
新安装的Ubuntu 14.04 x64上使用的命令:
sudo apt-get install gcc g++ git
git clone git://github.com/joyent/node.git
cd node
git checkout v0.10.30-release
export AR=arm-unknown-linux-gnueabi-ar
export CC=arm-unknown-linux-gnueabi-gcc
export CXX=arm-unknown-linux-gnueabi-g++
export LINK=arm-unknown-linux-gnueabi-g++
./configure --without-snapshot --dest-cpu=arm --dest-os=linux
在尝试在我的节点目录中运行./configure之后,我也遇到了此错误。以下是我在ubuntu服务器上运行的让node为我工作的命令:
为了解决这个问题,我刚刚运行了:sudo npm install-g npm我被要求在我的WSL、VSCode Windows终端中使用:
sudo apt get install npm-g-y
。IIRC,根据他们的文档,您还需要有make
。不确定为ARM编译是否不同。您是如何安装此ARM未知linux gnueabi-toolchain的?@Tonymake
v3.8.1已安装。@unixsmurf我没有安装它。这是要安装的东西吗?@unixsmurf我刚刚尝试了sudo-apt-get-install-gcc-arm-linux-gnueabi
,但这似乎不起作用。我想应该是:sudo-apt-get-install-g-npmThanks感谢关于步骤5需要一段时间的警告!因为确实如此,我有点害怕