18

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!

26

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
  • Yes, please. I just edited my question. – Randy Hartmen Nov 22 '10 at 21:46
  • Updated with a rough equivalent to the Debian meta-package. – Andrew M. Nov 23 '10 at 4:18
  • 14
    yum groupinstall "Development Tools" is a better match, I think. – ephemient Dec 1 '10 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 '10 at 3:35
23

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.

  • This fixed it for me. Using node (installing packages) on an AWS Amazon Linux instance, thanks! – magikMaker Jan 9 '18 at 15:34
17

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.