php 尝试编写器更新此错误出现在CentOs上

cgvd09ve  于 2023-02-11  发布在  PHP
关注(0)|答案(1)|浏览(102)

我试图在CentOs系统上部署我的laravel项目。当我运行 composer 更新命令时,我遇到了这个错误。我找不到解决方案,我在这个平台上搜索了解决方案。我找到了Windows,但没有在我的CentOs系统上工作。
窗用孤立子我将在php.ini文件中添加这一行:extension=php_fileinfo.dll,但没有工作。
错误信息;

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.
efzxgjgh

efzxgjgh1#

您所需的软件包之一需要一个特定的php扩展在您的CentOs系统。
请参见编写器更新引发的第2行错误消息

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

请从CentOs php.ini中取消注解以启用此缺少的php扩展
缺少的扩展名是 ext-fileinfo
注意:当你在新环境中部署你的项目时,运行“composer install”也是一个好主意,以最大限度地减少可能触发安装问题的突然的软件包版本更新。也不要忘记上传你的composer.lock。请看这里的文档:https://laravel.com/docs/9.x/deployment#autoloader-optimization

相关问题