Roots Discourse

Difficulty installing a library on Sage 9 with composer

I’m attempting to install vlucas/phpdotenv via composer and I’m running into the following issue:

Your requirements could not be resolved to an installable set of packages.
      
Problem 1
        - Installation request for vlucas/phpdotenv ^5.1 -> satisfiable by vlucas/phpdotenv[v5.1.0].
        - Conclusion: remove symfony/polyfill-mbstring v1.10.0
        - Conclusion: don't install symfony/polyfill-mbstring v1.10.0
        - vlucas/phpdotenv v5.1.0 requires symfony/polyfill-mbstring ^1.17 -> satisfiable by symfony/polyfill-mbstring[v1.17.0, v1.17.1, v1.18.0].
        - Can only install one of: symfony/polyfill-mbstring[v1.17.0, v1.10.0].
        - Can only install one of: symfony/polyfill-mbstring[v1.17.1, v1.10.0].
        - Can only install one of: symfony/polyfill-mbstring[v1.18.0, v1.10.0].
        - Installation request for symfony/polyfill-mbstring (locked at v1.10.0) -> satisfiable by symfony/polyfill-mbstring[v1.10.0].

Installation failed, reverting ./composer.json to its original content.

Can anyone offer any insight into how I can resolve this?

Thanks,
Dan

Have you tried deleting your composer.lock file and installing? This line:

- Installation request for symfony/polyfill-mbstring (locked at v1.10.0) -> satisfiable by symfony/polyfill-mbstring[v1.10.0].

says that it’s “locked at v1.10.0” and this line:

- vlucas/phpdotenv v5.1.0 requires symfony/polyfill-mbstring ^1.17 -> satisfiable by symfony/polyfill-mbstring[v1.17.0, v1.17.1, v1.18.0].

says that phpdotenv requires a version of polyfill-mbstring that’s 1.17 or greater. In other words, it’s telling you it can’t install polyfill-mbstring 1.17 because it’s been told (probably by the lockfile) that it can’t install a version other than 1.10.

That did the trick, thanks!

1 Like