K
K
krlljs2014-05-20 03:33:31
PHP
krlljs, 2014-05-20 03:33:31

Composer gives "Your requirements could not be resolved to an installable set of packages" error. How to resolve?

When composer update > ~/tosterit turns out

[32mLoading composer repositories with package information[0m
[32mUpdating dependencies (including require-dev)[0m
[37;41mYour requirements could not be resolved to an installable set of packages.[0m

  Problem 1
    - phpdocumentor/template-abstract 1.2.1 requires ext-xsl * -> the requested PHP extension xsl is missing from your system.
    - phpdocumentor/template-abstract 1.2 requires ext-xsl * -> the requested PHP extension xsl is missing from your system.
    - phpdocumentor/phpdocumentor dev-master requires phpdocumentor/template-abstract ~1.2 -> satisfiable by phpdocumentor/template-abstract[1.2, 1.2.1].
    - Installation request for phpdocumentor/phpdocumentor dev-master -> satisfiable by phpdocumentor/phpdocumentor[dev-master].
composer.json
{
    "name": "krll_/krll.tk",
    "require": {
        "slim/slim": "dev-master",
        "j4mie/paris": "dev-master",
        "phpdocumentor/phpdocumentor": "dev-master"
    },
    "config": {
        "bin-dir": "bin"
    }
}
How to resolve? Tried everything I could.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
krlljs, 2014-05-20
@krlljs

I found a raised topic here and here , there is also a hint for permission:
1. Check for the presence of the ext-xsl extension

$ composer show --platform | grep ext-x
$ composer show --platform | grep ext-xsl

2. if there is no ext-xsl in the lists, install
3. and add the dependency to composer.json as require-dev, read Require inline alias
4. so that the error no longer disturbs, you should also add a dependency on extensions, read Platform packages
composer require --dev ext-xsl "*"

A
Alexey Glukhikh, 2020-08-03
@TeslaYPT

Helped me personally:

sudo apt-get install php7.4-mbstring
    sudo apt-get install php7.4-xml

Instead of "php7.4" you can write your own version, for example "php5".
I tried almost everything, but this is what helped me

A
Akh_Kartoev, 2019-12-22
@Akh_Kartoev

new to this but composer self-update solved this problem

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question