1、错误信息
[InvalidArgumentException]
Package fxp/composer-asset-plugin at version ~1.1.1 has a PHP requirement incompatible with your PHP version, PHP
extensions and Composer version
解决方案:暂无
2、错误信息
[Composer\Downloader\TransportException]
curl error 28 while downloading https://repo.packagist.org/packages.json: Operation timed out after 12861 millisec
onds with 0 out of 0 bytes received
解决方案:切换镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
3、错误信息
[Composer\Downloader\TransportException]
curl error 61 while downloading https://mirrors.aliyun.com/composer/p2/fxp/composer-asset-plugin.json: Error while
processing content unencoding: Unknown failure within decompression software.
解决方案:清理缓存
composer clear
4、错误信息
[Seld\JsonLint\ParsingException]
"./composer.json" does not contain valid JSON
Parse error on line 1:
^
Expected one of: 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
解决方案:清理缓存
composer clear
5、composer检测警告问题----http connectivity to packagist: FAIL
[root@localhost /]# composer diagnose
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] curl error 7 while downloading http://repo.packagist.org/packages.json: Failed to connect to 2402:1f00:8001:930::: Network is unreachable
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
#检测
[root@localhost /]# php -r 'echo file_get_contents("https://packagist.org/packages.json");'
PHP Warning: file_get_contents(): SSL: Handshake timed out in Command line code on line 1
PHP Warning: file_get_contents(): Failed to enable crypto in Command line code on line 1
PHP Warning: file_get_contents(https://packagist.org/packages.json): failed to open stream: operation failed in Comman
解决方案:修改系统环境变量
vim /etc/profile
#进到profile文件最后一条 修改成:export PATH="$PATH:/usr/local/bin" 后保存退出
source /etc/profile
修改php.ini,把allow_url_fopen给启用,改成 allow_url_fopen = On -----我这修改不管用
修改php.ini,把 “;user_agent=PHP”前的分号去掉----我这修改不管用
6、composer检测警告问题----https connectivity to packagist: FAIL
[root@localhost ~]# composer self-update
You are already using the latest available Composer version 2.0.12 (stable channel).
[root@localhost ~]# composer diagnose
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: FAIL
[Composer\Downloader\TransportException] curl error 28 while downloading https://repo.packagist.org/packages.json: Operation timed out after 10004 milliseconds with 0 out of 0 bytes received
Checking github.com oauth access: OK
Checking disk free space: OK
解决方案:最后什么也没改自己好了
——————————————————————————
修改系统环境变量
root@DS218plus:~# export PATH=$PATH:/usr/local/webserver/php/bin
root@DS218plus:~# export PATH=$PATH:/usr/local/webserver/mysql/bin
版权声明:本文为mengliyuan908原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。