【问题标题】:Need help while updating composer更新作曲家时需要帮助
【发布时间】:2016-11-30 12:54:35
【问题描述】:

我收到以下错误,有人可以描述吗?我使用 Laravel 4 和 composer 作为依赖管理器。我尝试了几次这样做,在各种论坛上搜索并没有解决这个问题。如果有人能调查这个问题并提出解决方案,我将不胜感激。

Your requirements could not be resolved to an installable set of packages.
Problem 1
- maatwebsite/excel v1.3.7 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel 1.3.2 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.0 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.1 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.3 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.4 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.5 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.6 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- maatwebsite/excel v1.3.7 requires phpoffice/phpexcel ~1.8.0 -> satisfiable by phpoffice/phpexcel[1.8.1, 1.8.0].
- phpoffice/phpexcel 1.8.1 requires ext-xml * -> the requested PHP extension xml is missing from your system.
- phpoffice/phpexcel 1.8.0 requires ext-xml * -> the requested PHP extension xml is missing from your system.
- phpoffice/phpexcel 1.8.1 requires ext-xml * -> the requested PHP extension xml is missing from your system.

- Installation request for maatwebsite/excel ~1.3 -> satisfiable by maatwebsite/excel[1.3.2, v1.3.0, v1.3.1, v1.3.3, v1.3.4, v1.3.5, v1.3.6, v1.3.7].

  To enable extensions, verify that they are enabled in those .ini files:
    - /etc/php.ini
    - /etc/php.d/20-bz2.ini
    - /etc/php.d/20-calendar.ini
    - /etc/php.d/20-ctype.ini
    - /etc/php.d/20-curl.ini
    - /etc/php.d/20-exif.ini
    - /etc/php.d/20-fileinfo.ini
    - /etc/php.d/20-ftp.ini
    - /etc/php.d/20-gettext.ini
    - /etc/php.d/20-iconv.ini
    - /etc/php.d/20-mcrypt.ini
    - /etc/php.d/20-mysqlnd.ini
    - /etc/php.d/20-pdo.ini
    - /etc/php.d/20-phar.ini
    - /etc/php.d/20-sockets.ini
    - /etc/php.d/20-sqlite3.ini
    - /etc/php.d/20-tokenizer.ini
    - /etc/php.d/30-mysql.ini
    - /etc/php.d/30-mysqli.ini
    - /etc/php.d/30-pdo_mysql.ini
    - /etc/php.d/30-pdo_sqlite.ini
    - /etc/php.d/40-json.ini
    - /etc/php.d/40-zip.ini

这个问题很老,我是stackoverflow的新手。我以非常错误的格式发布了这个,这不是我获得-1 声誉的原因。此问题已解决,我正在编辑此问题只是为了更好地格式化此问题并提高可读性。

【问题讨论】:

    标签: laravel-4 composer-php


    【解决方案1】:

    如错误所示:the requested PHP extension xml is missing from your system

    您的主机上未安装或禁用 PHP-XML 扩展。您需要先启用或安装扩展,然后才能使用需要它的包。

    如果已安装,请在您的 php.ini 文件中启用扩展。如果未安装,请根据您的操作系统的需要安装扩展程序。

    对于 Ubuntu 安装这个扩展你需要运行 sudo apt-get install php-xml,对于其他操作系统你需要谷歌如何安装。

    【讨论】:

    • 这行得通,谢谢。我回复晚了,但感谢您的帮助。
    【解决方案2】:

    在我的情况下,php-xml 已经安装。

    root@shashank-dbserver /# apt-get install php-xml
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    php-xml is already the newest version.
    php-xml set to manually installed.
    

    所以,我不得不安装 php5.6-xml 而我的错误消失了。

    root@shashank-dbserver /# apt-get install php5.6-xml
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following package was automatically installed and is no longer required:
      zlib1g-dev
    Use 'apt-get autoremove' to remove it.
    The following NEW packages will be installed:
      php5.6-xml
    

    此后,composer update 命令运行正常。

    【讨论】:

    • 在我的例子中是 apt-get install php7.0-xml
    猜你喜欢
    • 2015-09-11
    • 2015-11-14
    • 2021-03-03
    • 2012-05-01
    • 2021-08-07
    • 1970-01-01
    • 2013-12-06
    • 2021-01-22
    • 1970-01-01
    相关资源
    最近更新 更多