Ben
Ben

Reputation: 73

Vagrant failing to install Puppet

When I run Vagrant up, it is doing all the provisioning and whatnot and then I see the error:

==> default: ERROR:  Error installing puppet:

And later:

==> default: Unable to load puppet. Please install it using native packages for your platform (eg .deb, .rpm, .dmg, etc).
==> default: No such file or directory - puppet

In my vagrantfile in the config I have:

config.vm.provision :puppet do |puppet|
    puppet.manifests_path = "puppet/manifests"
    puppet.manifest_file  = "site.pp"
    puppet.module_path = "puppet/modules"
    puppet.hiera_config_path = "puppet/hiera.yaml"
    puppet.options = "--verbose --debug --pluginsync"
  end

And in the folder I'm running vagrant up is a folder called puppet which has the various files and folders referenced in the provisioning.

Any help as to why this would fail or how I can fix it would be most helpful.

EDIT: Just ran vagrant up in debug mode and maybe it's related to a not advanced enough version of ruby? I am unsure if it's directly related or not:

DEBUG ssh: stderr: ERROR:  Error installing puppet:
    json_pure requires Ruby version ~> 2.0.

 INFO interface: info: ERROR:  Error installing puppet:
    json_pure requires Ruby version ~> 2.0.
 INFO interface: info: ==> default: ERROR:  Error installing puppet:
==> default:    json_pure requires Ruby version ~> 2.0.
==> default: ERROR:  Error installing puppet:
==> default:    json_pure requires Ruby version ~> 2.0.

Upvotes: 2

Views: 712

Answers (1)

Ben
Ben

Reputation: 73

Ok anyone who has run into this problem also or if you're just curious what the problem was. json_pure is a dependency of puppet and when puppet gets installed it tries to install the latest version of json_pure. As it turns out json_pure released a new version 2 days ago on July 26th (2.0.2) which has a dependence of ruby that is above the version 1.9 that is running in my vagrant setup currently. In order to fix this issue, I forced it to use the previous version of json_pure (2.0.1).

To do that simply put in:

gem install json_pure -v 2.0.1

Somewhere before it does the puppet install so that it already had json_pure and wouldn't try to install the latest version as a dependency to puppet.

Upvotes: 1

Related Questions