skip to Main Content

I’m trying to deploy my laravel project on CentOs system. When im going to run composer update command i am encountering this error. I can’t figure out the solution and I saerched for soloution in this platform. I found for windows but not work on my CentOs system.

Soliton for windows;
I am going to add this line in php.ini file: extension=php_fileinfo.dll but didn’t work.

Error Message;

Continue as root/super user [yes]? yes
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
 Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - laravel/framework[v8.12.0, ..., 8.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0, ..., 1.x-dev].
    - league/flysystem[1.1.0, ..., 1.x-dev] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - Root composer.json requires laravel/framework ^8.12 -> satisfiable by laravel/framework[v8.12.0, ..., 8.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
    - /opt/cpanel/ea-php74/root/etc/php.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-bcmath.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-calendar.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-ctype.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-curl.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-dom.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-ftp.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-gd.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-iconv.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-imap.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-json.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-mbstring.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-mysqlnd.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-pdo.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-phar.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-posix.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-simplexml.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-sockets.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-sqlite3.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-tokenizer.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-xml.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-xmlwriter.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/20-xsl.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/30-mysqli.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/30-pdo_mysql.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/30-pdo_sqlite.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/30-xmlreader.ini
    - /opt/cpanel/ea-php74/root/etc/php.d/zzzzzzz-pecl.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-fileinfo` to temporarily ignore these required extensions.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

2

Answers


  1. Chosen as BEST ANSWER

    I encountered this problem again and resolved it as follows:

    After installing the File Info extension and other necessary packages via EasyApache in the WHM panel, my problem was completely resolved. Thanks to everyone.


  2. One of your required package need a specific php extension in your CentOs system.

    See the 2nd line error message thrown by composer update

    - league/flysystem[1.1.0, ..., 1.x-dev] 
     require ext-fileinfo * -> it is missing from your system. 
     Install or enable PHP's fileinfo extension.
    

    Please enable this missing php extension by uncomment it from inside your CentOs php.ini

    The missing extension is ext-fileinfo

    Note: also a good idea to run "composer install" when deploying your project in new environment, to minimize sudden package version updated that might trigger installation issues.
    Also dont forget to upload your composer.lock as well.
    Have a look at documentation here:
    https://laravel.com/docs/9.x/deployment#autoloader-optimization

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search