作曲家需求开发问题

时间:2018-07-18 06:09:33

标签: php windows ubuntu composer-php

我在工作中的Windows上安装了开发人员模式,并且在安装一些运行项目所需的程序/功能时遇到很多问题。 问题之一是当我运行composer install或composer install --no-plugins --no-scripts时,总是会出现此错误。

    Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for dompdf/dompdf v0.8.2 -> satisfiable by dompdf/dompdf[v0.8.2].
    - dompdf/dompdf v0.8.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
  Problem 2
    - Installation request for erusev/parsedown 1.7.1 -> satisfiable by erusev/parsedown[1.7.1].
    - erusev/parsedown 1.7.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
  Problem 3
    - Installation request for laravel/framework v5.5.40 -> satisfiable by laravel/framework[v5.5.40].
    - laravel/framework v5.5.40 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
  Problem 4
    - Installation request for league/csv 8.2.3 -> satisfiable by league/csv[8.2.3].
    - league/csv 8.2.3 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
  Problem 5
    - Installation request for teamtnt/tntsearch v1.3.1 -> satisfiable by teamtnt/tntsearch[v1.3.1].
    - teamtnt/tntsearch v1.3.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
  Problem 6
    - Installation request for facebook/webdriver 1.3.0 -> satisfiable by facebook/webdriver[1.3.0].
    - facebook/webdriver 1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
  Problem 7
    - Installation request for phpunit/phpunit 6.5.8 -> satisfiable by phpunit/phpunit[6.5.8].
    - phpunit/phpunit 6.5.8 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
  Problem 8
    - dompdf/dompdf v0.8.2 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - barryvdh/laravel-dompdf v0.8.2 requires dompdf/dompdf ^0.8 -> satisfiable by dompdf/dompdf[v0.8.2].
    - Installation request for barryvdh/laravel-dompdf v0.8.2 -> satisfiable by barryvdh/laravel-dompdf[v0.8.2].

  To enable extensions, verify that they are enabled in those .ini files:
    - /etc/php/7.0/cli/php.ini
    - /etc/php/7.0/cli/conf.d/10-opcache.ini
    - /etc/php/7.0/cli/conf.d/10-pdo.ini
    - /etc/php/7.0/cli/conf.d/15-xml.ini
    - /etc/php/7.0/cli/conf.d/20-calendar.ini
    - /etc/php/7.0/cli/conf.d/20-ctype.ini
    - /etc/php/7.0/cli/conf.d/20-dom.ini
    - /etc/php/7.0/cli/conf.d/20-exif.ini
    - /etc/php/7.0/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.0/cli/conf.d/20-ftp.ini
    - /etc/php/7.0/cli/conf.d/20-gd.ini
    - /etc/php/7.0/cli/conf.d/20-gettext.ini
    - /etc/php/7.0/cli/conf.d/20-iconv.ini
    - /etc/php/7.0/cli/conf.d/20-intl.ini
    - /etc/php/7.0/cli/conf.d/20-json.ini
    - /etc/php/7.0/cli/conf.d/20-phar.ini
    - /etc/php/7.0/cli/conf.d/20-posix.ini
    - /etc/php/7.0/cli/conf.d/20-readline.ini
    - /etc/php/7.0/cli/conf.d/20-shmop.ini
    - /etc/php/7.0/cli/conf.d/20-simplexml.ini
    - /etc/php/7.0/cli/conf.d/20-sockets.ini
    - /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.0/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.0/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.0/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.0/cli/conf.d/20-wddx.ini
    - /etc/php/7.0/cli/conf.d/20-xmlreader.ini
    - /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
    - /etc/php/7.0/cli/conf.d/20-xsl.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

我已经安装了PHP 命令php -v

PHP 7.0.30-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.30-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies

3 个答案:

答案 0 :(得分:1)

您的错误非常清楚。您尚未在服务器上启用mbstring。请检查php.ini并启用它。重新尝试启动服务器。

答案 1 :(得分:1)

此错误的解决方案是安装以下两个软件包:

var flag=0;
jssor_1_slider_init = function() {

  var jssor_1_options = {
        $AutoPlay: 0,
        $DragOrientation: 2,
        $PlayOrientation: 2,
        $FillMode: 2,
        $Loop: 0,
        $SlideWidth: 375,
        $BulletNavigatorOptions: {
          $Class: $JssorBulletNavigator$,
          $Orientation: 2
        }
  };

  var jssor_1_slider = new $JssorSlider$("jssor_1", jssor_1_options);
  //////////////////////trying to get append next slide/////////////////////////////
    function DisplayIndex(position, virtualPosition) {
         console.log("---------------");
        if(flag==0){
          flag=1;
          previous_position = parseInt(virtualPosition)+1;
        }
        else {
              var total_slides = jssor_1_slider.$SlidesCount();
              var current_slide = parseInt(virtualPosition)+1;
              if(previous_position==current_slide){
                console.log("do nothing");
              }
              if(previous_position>current_slide){
                console.log("previous");
              }
              if(previous_position<current_slide){
                console.log("next");
                var slidesHtml='<div><img data-u="image" src="img/010.jpg" /></div>';
                jssor_1_slider.$AppendSlides(slidesHtml, total_slides);
                jssor_1_slider.$GoTo(position);
              }
              previous_position = current_slide;
        }
    }
    jssor_1_slider.$On($JssorSlider$.$EVT_SWIPE_END, DisplayIndex);//$EVT_DRAG_END
  //////////////////////trying to get append next slide ends/////////////////////////////
};

答案 2 :(得分:0)

您必须确保具有必需的php扩展名ext-mbstringext-curl,然后将它们添加到php.ini-文件中。

请参阅以下有关在Windows上安装php-extensions的文档:http://php.net/manual/de/install.pecl.windows.php