尝试在 Laravel 5 项目中运行作曲家安装时出错


Error when trying to run composer install in a Laravel 5 project

我尝试运行composer install以在Laravel 5项目中安装依赖项,但是出现此错误:

$ 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 intervention/image 2.3.4 -> satisfiable by intervention/image[2.3.4].
    - intervention/image 2.3.4 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.

我听过有些人说在我的PHP.ini文件中添加一些东西,但我不知道应该配置哪个PHP.ini,因为我有 2 个PHP.ini文件,一个在 XAMPP 中,1 个在 IISEXPRESS 中。我不知道如何解决这个问题,请任何帮助将不胜感激。谢谢。

我移动了我的作曲家并开始收到同样的错误。所以我删除了 PHP7.0 并安装了 7.1,它解决了这个问题。我几乎可以肯定我可以为 7.0 运行以下命令,它也可以解决问题。

7.1

sudo apt install -y php7.1 php7.1-cli php7.1-common libapache2-mod-php7.1 php7.1-mysql php7.1-fpm php7.1-curl php7.1-gd php7.1-bz2 php7.1-mcrypt php7.1-json php7.1-tidy php7.1-mbstring php-redis php-memcached

7,0

sudo apt install -y php7.0 libapache2-mod-php7.0 php7.0-cli php7.0-common php7.0-mbstring php7.0-gd php7.0-intl php7.0-xml php7.0-mysql php7.0-mcrypt php7.0-zip php7.0-fpm php7.0-bz2 php7.0-json php7.0-tidy php-redis  php-memcached