When you try to install a new module from the Puppet Forge, you get an error that the version of another installed module (a dependency) is incorrect. However, the version number of the installed module matches the range given in the error.
Error messages and logs
When installing the module, you get an error similar to:
The requested version cannot satisfy one or more of the following installed modules: puppetlabs-stdlib, installed: 7.1.0, expected: >= 4.0.0 < 9.0.0
Version 7.1.0 is greater than or equal to 4.0.0 and less than 9.0.0. Even though you have a version that should work, you get this error because you have multiple modules installed that require different versions of the same module, in this case,
stdlib, which is a common dependency.
Version and installation information
PE version: All supported
To fix this error, use the following steps to check for issues with module dependency, and resolve those issues by updating your modules.
On the primary server, check for dependency issues for all installed modules by running
puppet module list --debug
Your output is similar to:
Warning: Module 'puppetlabs-stdlib' (v7.1.0) fails to meet some dependencies: 'puppetlabs-apache' (v5.10.0) requires 'puppetlabs-stdlib' (>= 4.13.1 < 7.0.0)
Resolve the issue by updating your modules. Based on the example output, you could upgrade
puppetlabs-apacheto a version that supports stdlib v7.1.0 since this version already satisfies the dependencies for other modules installed.
The steps you take to resolve will be dependent on the modules you have installed and might involve downgrading if the latest version of a module can’t satisfy all of your dependencies.