Reputation: 63619
While trying to use a Ubuntu 14.04 system to cross compile Node.js v0.10.30 for ARM (Raspberry Pi B), I'm experiencing an error message:
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.
How should I fix this problem and compile node.js successfully?
Commands used on a fresh Ubuntu 14.04 x64 installation:
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
Upvotes: 7
Views: 14883
Reputation: 81
Install the build essential using the below commands, these will install gcc as well. It worked for me. Let me know if this works for you.
sudo apt update
sudo apt install build-essential
Upvotes: 2
Reputation: 1
I was required to use: sudo apt-get install npm -g -y
in my WSL, VSCode Windows terminal.
Upvotes: 0
Reputation: 179
I ran into this error as well after trying to run ./configure in my node directory. Here are the commands I ran to get node working for me on an ubuntu server:
Then try running your node file from it's directory. As a small aside, I also got the following error when doing that:
Error: ENOENT, stat '/home/ubuntu/local' at Error (native)
To fix that, I just ran: sudo npm install -g npm
Upvotes: 10