composer 报错 - league/flysystem[1.1.0, ..., 1.x-dev] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
时间: 2024-02-18 18:02:45 浏览: 104
The error message suggests that the `fileinfo` extension for PHP is not installed or enabled on your system. The `league/flysystem` package requires this extension to function properly.
To resolve this issue, you need to install or enable the `fileinfo` extension for PHP. The steps to do this can vary depending on your operating system and PHP version.
Here are some general steps you can follow:
1. Check if the `fileinfo` extension is already installed on your system by running the following command in your terminal:
```
php -m | grep fileinfo
```
If the output shows `fileinfo` in the list, it means the extension is installed and enabled.
2. If the `fileinfo` extension is not installed, you can try installing it using your system's package manager. For example, on Ubuntu, you can run the following command:
```
sudo apt-get install php-fileinfo
```
On CentOS, you can run:
```
sudo yum install php-fileinfo
```
Alternatively, you can install the extension using PECL by running:
```
pecl install fileinfo
```
After installation, make sure to enable the extension in your `php.ini` configuration file by adding the following line:
```
extension=fileinfo.so
```
3. Restart your web server or PHP-FPM process to apply the changes.
After completing these steps, try running the `composer require league/flysystem:^1.1` command again and see if the issue is resolved.
阅读全文