# 安装composer
这里不解释了
# 执行
Problem 1
- Installation request for league/flysystem 1.0.50 -> satisfiable by league/flysystem[1.0.50].
- league/flysystem 1.0.50 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
Problem 2
- league/flysystem 1.0.50 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
- laravel/framework v5.7.26 requires league/flysystem ^1.0.8 -> satisfiable by league/flysystem[1.0.50].
- Installation request for laravel/framework v5.7.26 -> satisfiable by laravel/framework[v5.7.26].
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/php/etc/php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
解决:
安装PHP程序的时候,提示The fileinfo extension is required.,缺少fileinfo 扩展,因为LNmpA没有自行开启,所以需要我们手工去开启fileinfo 扩展。
方法如下:
第一步:找到llnmp安装源位置:
cd /lnmp1.5/src/php-5.6.9/ext/fileinfo/
(如果php包没解压,那就解压)
第二步:
/usr/local/php/bin/phpize
返回类似下面的信息:
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
phpize是什么东西呢?
php官方的说明:http://php.net/manual/en/install.pecl.phpize.php
phpize是用来扩展php扩展模块的,通过phpize可以建立php的外挂模块,比如你想在原来编译好的php中加入memcached或者ImageMagick等扩展模块,可以使用phpize。
第三步:
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
返回类似下面信息:
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
表明安装成功了。
第四步:
/usr/local/php/etc/php.ini 添加扩展:
extension=fileinfo.so
/etc/init.d/php-fpm restart
#然后重新执行composer
composer install
OK,成功
---------------------
作者:精哥哥
来源:CSDN
原文:https://blog.csdn.net/qq_36602939/article/details/87382844
版权声明:本文为博主原创文章,转载请附上博文链接!