29

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!

4 Answers 4

37

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
4
  • Yes, please. I just edited my question. Nov 22, 2010 at 21:46
  • Updated with a rough equivalent to the Debian meta-package.
    – Andrew M.
    Nov 23, 2010 at 4:18
  • 16
    yum groupinstall "Development Tools" is a better match, I think.
    – ephemient
    Dec 1, 2010 at 2:49
  • Unfortunately (or fortunately?), you'll end up installing a ton of packages that you won't likely need. Although if you have the time and space to spare, this will save you a lot of time on future compiles.
    – Andrew M.
    Dec 1, 2010 at 3:35
30

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

yum groupinstall "Development Tools"
1
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.

2
  • This fixed it for me. Using node (installing packages) on an AWS Amazon Linux instance, thanks!
    – magikMaker
    Jan 9, 2018 at 15:34
  • Fixed it for Node V12. Thanks ! May 14, 2020 at 10:10
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .