When puppet module install fails to find a module version for which dependencies can be satisfied, the operation fails with an error message. The message does not include any information about which dependency could not be satisfied which leaves no starting point for debugging and resolving the issue.
Reproduction Case
- Install Puppet 6 on CentOS 7:
rpm -Uvh http://yum.puppetlabs.com/puppet6/puppet6-release-el-7.noarch.rpm
|
yum install -y puppet-agent
|
source /etc/profile.d/puppet-agent.sh
|
- Install the latest version of puppetlabs-stdlib:
puppet module install puppetlabs-stdlib
|
- Attempt to install v0.4.0 of puppetlabs-puppet_authorization, which depends on stdlib "< 5.0.0":
puppet module install puppetlabs-puppet_authorization --version 0.4.0
|
Outcome
Installation fails with an error about unsatisfiable dependencies, but no information on which dependency could not be satisfied:
# puppet module install puppetlabs-stdlib
|
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
|
Notice: Downloading from https://forgeapi.puppet.com ...
|
Notice: Installing -- do not interrupt ...
|
/etc/puppetlabs/code/environments/production/modules
|
└── puppetlabs-stdlib (v5.0.0)
|
|
# puppet module install puppetlabs-puppet_authorization --version 0.4.0
|
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
|
Notice: Downloading from https://forgeapi.puppet.com ...
|
Error: Could not install module 'puppetlabs-puppet_authorization' (???)
|
No version of 'puppetlabs-puppet_authorization' can satisfy all dependencies
|
Use `puppet module install --ignore-dependencies` to install only this module
|
Expected Outcome
The error message lists puppetlabs-stdlib, its version, and the unsatisfiable dependency "< 5.0.0" that caused installation to fail. The module where the unsatisfiable dependency occurred should also be listed as this error can arise from transitive dependencies. E.g. a dependency of a dependency of the module being installed cannot have its constraints satisfied.