Ask Your Question

Could not retrieve fact='package_provider'

asked 2016-01-05 15:50:54 -0600

Mark_Unix_bc gravatar image

When I do a: puppet apply nginx/manifests/init.pp --debug

get the following: Could not retrieve fact='package_provider', resolution='<anonymous>': Malformed version number string 3.7.3 (Puppet Enterprise 3.7.1) Notice: Compiled catalog for vdclpuptst01.bcferries.corp in environment production in 0.02 seconds

edit retag flag offensive close merge delete


This may be nothing to do with your manifest file. Please post output from `puppet --version`, `facter puppetversion` and `puppet agent -t`.

lqueryvg gravatar imagelqueryvg ( 2016-01-06 13:33:00 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-01-06 14:14:13 -0600

GregLarkin gravatar image

updated 2016-01-06 15:48:17 -0600

This is a bug in the puppetlabs/stdlib module, and it was recently fixed with this pull request:

The Forge version of stdlib has not been updated, but I expect the next official release will include the fix. In the mean time, you can apply the patch manually, or if you are using a control repository with a Puppetfile, make a reference to commit SHA 1c6ae4793f9ab8a3c4a15ec1a01563b42715879b for the stdlib github repository.


If you want to manually incorporate the pending change before the official module release appears, you can download these files:

Then you'll need to search for existing copies of those 2 files, back them up somewhere and copy the newly-downloaded versions into place.

NOTE: I have not tried this, so YMMV, but it appears to be safe enough to resolve the problem until the next official stdlib update.

NOTE #2: The other option you can use if you prefer not to modify the installed module code is to install an older version of the stdlib module. If you don't have any reason to use the absolute latest one, it appears that version 4.9.1 is the last version before the broken package_provider fact appeared.

edit flag offensive delete link more


Thanks so much Greg. Not too sure how to patch this, but this is a great starting point. Cheers

Mark_Unix_bc gravatar imageMark_Unix_bc ( 2016-01-06 14:45:02 -0600 )edit

I'll update my answer with a process for you.

GregLarkin gravatar imageGregLarkin ( 2016-01-06 15:40:54 -0600 )edit

That is great, really appreciate that. Thanks again Greg

Mark_Unix_bc gravatar imageMark_Unix_bc ( 2016-01-06 15:58:25 -0600 )edit

Looks like this is still an issue with the 4.11.0. sudo bash -c "facter --puppet --yaml > && echo foo" 2016-01-27 15:51:52.071838 ERROR puppetlabs.facter - error while resolving custom fact "package_provider": undefined method `split' for nil:NilClass

jhg03a gravatar imagejhg03a ( 2016-01-27 16:07:50 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-01-05 15:50:54 -0600

Seen: 743 times

Last updated: Jan 06 '16