1

My puppet agent run fails initially, then succeeds on the second run. I understand that it probably has to do with my execution order, and a dependency is being added later on in the execution process.

However, I cannot figure out what the missing dependency is, are there any troubleshooting practices that might help me to figure it out?

Here's my error:

CXX(target) Release/obj.target/contextify/src/contextify.o
make: g++: Command not found
make: *** [Release/obj.target/contextify/src/contextify.o] Error 127

.. which occurs as my puppet class is trying to install an NPM module with:

/usr/bin/node /usr/bin/npm install --global log.io --user 'monitor'

-

Additional points that may be relevant

  • I understand the failure is related to the g++ binary, but I do not see where any of the catalog beyond this failure could install g++ (I assume I should find a 'gcc' or 'make' package, or a package that has one of those as a dependency)
  • This failure does not occur in my Vagrant testing environment, but only when trying to provision an AWS instance
  • Running CentOS 6.4

Thank you for your help!

1 Answers1

1

You probably didn't provision a minimal server with Vagrant, so all the packages you needed were already installed.

You can locate the package you need with yum:

yum whatprovides '*/g++'

This works whether or not the package is installed.

You can then include the named package in an appropriate place in one of your classes:

package { 'gcc-c++':
    ensure => installed,
}
Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
  • Oh, nice command. I ran that, it showed 4 packages, and I do not have any of those (used 'yum list installed'). Then I realized that nothing named g++ exists on the system at all. (used mlocate) .. ugh, so lost.. – LukeChavers Dec 11 '13 at 03:54
  • The _package_ name wasn't `g++`! – Michael Hampton Dec 11 '13 at 03:56
  • Right, but the four packages that provide g++ should create a g++ binary, and I don't have a g++ binary at all, even though my subsequent puppet runs are running the npm install command successfully. But, I'll try adding gcc-c++ forcefully, and add a require statement.. maybe it will fix it. – LukeChavers Dec 11 '13 at 03:59