composer dependency stating it doesn't have php-xsl

倖福魔咒の 提交于 2019-12-12 16:25:33

问题


A composer dependency is stating it doesn't have php-xsl. I'm trying to install phpdocumentor/phpdocumentor, but it won't let me because of a requirement. So now I'm trying to install the requirement and I get this:

$ composer require phpdocumentor/template-zend
Using version ~1.3 for phpdocumentor/template-zend
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpdocumentor/template-zend 1.3.2 requires ext-xsl * -> the requested PHP extension xsl is missing from your system.
    - phpdocumentor/template-zend 1.3.1 requires ext-xsl * -> the requested PHP extension xsl is missing from your system.
    - phpdocumentor/template-zend 1.3.0 requires ext-xsl * -> the requested PHP extension xsl is missing from your system.
    - Installation request for phpdocumentor/template-zend ~1.3 -> satisfiable by phpdocumentor/template-zend[1.3.0, 1.3.1, 1.3.2].


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

PHP info:

xsl

XSL enabled
libxslt Version 1.1.28
libxslt compiled against libxml Version 2.9.1
EXSLT   enabled
libexslt Version    1.1.28

Or is it maybe telling me I need ext-xsl? What is that? Or is it saying what it looks like to me, that I need PHP xsl?

This is different that the marked dup post, see my comment below as to why.


回答1:


Try running php -m to get a list of all loaded extensions and see if XSL is included in it (a quick php -m | grep xsl could save some search time).

If it's not the case, you should find out which INI file is used by running php --ini. Open this file and make sure this line is uncommented (without a ; prefix):

extension=php_xsl.dll


来源:https://stackoverflow.com/questions/29664357/composer-dependency-stating-it-doesnt-have-php-xsl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!