How Do You Solve The Problem When Puppet Agent Returns an Error About “require_relative for main:Object”?

Problem scenario:  On a Linux server you run "puppet agent -t" to apply a manifest on a Puppet Agent.  You receive this error:

"Error: Could not retrieve local facts: undefined method 'require_relative' for main:Object"

What do you do to fix this?

Solution:  Install a compatible version of Puppet agent on the server.  One way to do this is to run this command:

curl -k https://continualintegration:8140/packages/current/install.bash | sudo bash`

#where "continualintegration" is the hostname (or FQDN) of the Puppet Master server.

This way is preferred because the Puppet Agent server gets the installation media from the Puppet Master itself.

Leave a comment

Your email address will not be published. Required fields are marked *