27

I am trying to compile Node.js on Amazon EC2, but I can't even install "build essential". Where's the problem?

Thanks.


sudo yum install build-essential
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
(...)
No package build-essential available.
Error: Nothing to do

./configure
Checking for program g++ or c++          : not found 
Checking for program icpc                : not found 
Checking for program c++                 : not found 
error: could not configure a cxx compiler!

could not configure a cxx compiler!

Randy Hartmen
  • 273
  • 1
  • 3
  • 5

4 Answers4

35

build-essential is a package that resides in aptitude (Debian), not in Yum (RHEL). Maybe you should rephrase your question to provide more information about the core issue--i.e., installing EC2 tools?


The (rough) equivalent of the build-essential meta-package for yum is:

yum install make glibc-devel gcc patch
Andrew M.
  • 11,182
  • 2
  • 35
  • 29
30

Its important enough to make this more complete alternative a separate entry:

yum groupinstall "Development Tools"
  • yes, this is the official answer from aws: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/compile-software.html – sekmo Sep 23 '18 at 19:52
28

I'm assuming that you are building node.js, as I had the same problem. I think the one you are missing is:

yum install gcc-c++

But you might need more than that one after you get past the first part.

dbellizzi
  • 381
  • 4
  • 6
5

In addition to gcc-c++, I also needed to install the development packages for openssl:

yum install openssl-devel

After that was installed I could then compile and install node.js successfully per http://nodejs.org/#download

crcastle
  • 351
  • 2
  • 3