Building Node.js出现错误:Node.js配置错误:未找到可接受的C编译器

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

在尝试使用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 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为我工作的命令:

  • cd。。(返回创建节点目录的目录)
  • sudo-apt-get-install-build-essential
  • cd节点/
  • /配置
  • make(对于像我这样的相对新手来说,这一步需要一段时间才能完成,所以如果发生这种情况,不要太紧张)
  • sudo制作安装
  • 然后尝试从其目录运行节点文件。顺便说一句,我在做这件事时也犯了以下错误:

    错误:enoint,stat'/home/ubuntu/local' 错误(本机)


    为了解决这个问题,我刚刚运行了:sudo npm install-g npm

    我被要求在我的WSL、VSCode Windows终端中使用:
    sudo apt get install npm-g-y

    IIRC,根据他们的文档,您还需要有
    make
    。不确定为ARM编译是否不同。您是如何安装此ARM未知linux gnueabi-toolchain的?@Tony
    make
    v3.8.1已安装。@unixsmurf我没有安装它。这是要安装的东西吗?@unixsmurf我刚刚尝试了
    sudo-apt-get-install-gcc-arm-linux-gnueabi
    ,但这似乎不起作用。我想应该是:sudo-apt-get-install-g-npmThanks感谢关于步骤5需要一段时间的警告!因为确实如此,我有点害怕