简体   繁体   English

Laravel 错误编辑器更新

[英]Laravel Error Composer Update

user@user:/opt/lampp/htdocs/gitrepo$ composer update
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
    - laravel/framework v5.6.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework v5.6.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - laravel/framework 5.6.x-dev requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
    - Installation request for laravel/framework 5.6.* -> satisfiable by laravel/framework[5.6.x-dev, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.18, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.3, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9].

  To enable extensions, verify that they are enabled in those .ini files:
    - /etc/php/7.1/cli/php.ini
    - /etc/php/7.1/cli/conf.d/10-opcache.ini
    - /etc/php/7.1/cli/conf.d/10-pdo.ini
    - /etc/php/7.1/cli/conf.d/15-xml.ini
    - /etc/php/7.1/cli/conf.d/20-calendar.ini
    - /etc/php/7.1/cli/conf.d/20-ctype.ini
    - /etc/php/7.1/cli/conf.d/20-dom.ini
    - /etc/php/7.1/cli/conf.d/20-exif.ini
    - /etc/php/7.1/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.1/cli/conf.d/20-ftp.ini
    - /etc/php/7.1/cli/conf.d/20-gettext.ini
    - /etc/php/7.1/cli/conf.d/20-iconv.ini
    - /etc/php/7.1/cli/conf.d/20-json.ini
    - /etc/php/7.1/cli/conf.d/20-phar.ini
    - /etc/php/7.1/cli/conf.d/20-posix.ini
    - /etc/php/7.1/cli/conf.d/20-readline.ini
    - /etc/php/7.1/cli/conf.d/20-shmop.ini
    - /etc/php/7.1/cli/conf.d/20-simplexml.ini
    - /etc/php/7.1/cli/conf.d/20-sockets.ini
    - /etc/php/7.1/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.1/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.1/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.1/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.1/cli/conf.d/20-wddx.ini
    - /etc/php/7.1/cli/conf.d/20-xmlreader.ini
    - /etc/php/7.1/cli/conf.d/20-xmlwriter.ini
    - /etc/php/7.1/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

I got this error when i tried to update composer.当我尝试更新作曲家时出现此错误。 what solution can resolve it?什么解决方案可以解决它? i have installed php7.1 and i have installed composer too (sudo apt-get install composer)我已经安装了 php7.1 并且我也安装了 composer (sudo apt-get install composer)

Your package need some dependancy that it cannot found currently.您的包需要一些目前无法找到的依赖项。 Try following commands and update composer then,尝试以下命令并更新作曲家,然后,

sudo apt-get install php7.1-mbstring
sudo service apache2 restart
composer update

After uncommenting, the said extensions in php.ini file and the composer doesn't function correctly.取消注释后, php.ini file的上述扩展名和 composer 无法正常运行。 if you run into the error below, then you need to uncomment some other extensions in php.ini file .如果您遇到以下错误,则需要取消注释php.ini file其他一些扩展名。

// Error on the terminal when I ran: composer install

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 league/flysystem 1.0.64 -> satisfiable by league/flysystem[1.0.64].
    - league/flysystem 1.0.64 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
  Problem 2
    - league/flysystem 1.0.64 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - laravel/framework v6.14.0 requires league/flysystem ^1.0.8 -> satisfiable by league/flysystem[1.0.64].
    - Installation request for laravel/framework v6.14.0 -> satisfiable by laravel/framework[v6.14.0].

  To enable extensions, verify that they are enabled in your .ini files:
    - C:\PHP7\php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI 
mode.

As this resource and others didn't mention the installation for PHP7.4, but you can still follow them.由于该资源其他资源没有提到 PHP7.4 的安装,但您仍然可以关注它们。 After I uncommented as mentioned in this article .之后我取消了本文中提到的注释。 You'll also need to uncomment您还需要取消注释

extension=fileinfo
extension=mbstring // probabily this too

As the error message " the requested PHP extension mbstring is missing from your system. " states your system is missing the PHP extension mbstring .由于错误消息“您的系统中缺少请求的 PHP 扩展 mbstring。 ”指出您的系统缺少 PHP 扩展mbstring

If you have apt/apt-get installed you can search for the extension using如果您安装了apt/apt-get ,则可以使用以下命令搜索扩展名

apt search php7.1-mbstring

To install it use:要安装它,请使用:

sudo apt install php7.1-mbstring
composer install --ignore-platform-reqs \
composer update --ignore-platform-reqs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM