添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Composer install 报错

项目构建命令:

composer install --no-dev --no-interaction -o --ignore-platform-reqs

构建输出:没有错误,陷入死循环

> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: elfsundae/laravel-hashid
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: intervention/image
Discovered Package: laravel/tinker
Discovered Package: maatwebsite/excel
Discovered Package: milon/barcode
Discovered Package: nesbot/carbon
Discovered Package: overtrue/laravel-wechat
Discovered Package: sentry/sentry-laravel
Discovered Package: shallowman/laralog
Discovered Package: tymon/jwt-auth
Package manifest generated successfully.
69 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Loading composer repositories with package information
Warning: Accessing gitlab.zz-med-stg.com over http which is an insecure protocol.
Updating dependencies
Lock file operations: 0 installs, 3 updates, 0 removals
  - Downgrading symfony/http-client (v6.2.6 => v5.4.20)
  - Downgrading symfony/http-client-contracts (v3.1.1 => v2.5.2)
  - Upgrading symfony/http-kernel (v4.4.13 => v4.4.50)
Writing lock file
Installing dependencies from lock file
Package operations: 0 installs, 3 updates, 0 removals
  - Downgrading symfony/http-client-contracts (v3.1.1 => v2.5.2): Extracting archive
  - Upgrading symfony/http-kernel (v4.4.13 => v4.4.50): Extracting archive
  - Downgrading symfony/http-client (v6.2.6 => v5.4.20): Extracting archive
101 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package overtrue/wechat is abandoned, you should avoid using it. Use w7corp/easywechat instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package php-cs-fixer/diff is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
Class App\Services\Data\Department\DataBoardRoomIdService located in ./app/Services/Data/Department/DataBoardRoomidService.php does not comply with psr-4 autoloading standard. Skipping.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: elfsundae/laravel-hashid
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: intervention/image
Discovered Package: laravel/tinker
Discovered Package: maatwebsite/excel
Discovered Package: milon/barcode
Discovered Package: nesbot/carbon
Discovered Package: overtrue/laravel-wechat
Discovered Package: sentry/sentry-laravel
Discovered Package: shallowman/laralog
Discovered Package: tymon/jwt-auth
Package manifest generated successfully.
69 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Loading composer repositories with package information
Warning: Accessing gitlab.zz-med-stg.com over http which is an insecure protocol.
Updating dependencies
Lock file operations: 0 installs, 3 updates, 0 removals
  - Upgrading symfony/http-client (v5.4.20 => v6.2.6)
  - Upgrading symfony/http-client-contracts (v2.5.2 => v3.1.1)
  - Downgrading symfony/http-kernel (v4.4.50 => v4.4.13)
Writing lock file
Installing dependencies from lock file
Package operations: 0 installs, 3 updates, 0 removals
  - Downgrading symfony/http-kernel (v4.4.50 => v4.4.13): Extracting archive
  - Upgrading symfony/http-client-contracts (v2.5.2 => v3.1.1): Extracting archive
  - Upgrading symfony/http-client (v5.4.20 => v6.2.6): Extracting archive
101 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package overtrue/wechat is abandoned, you should avoid using it. Use w7corp/easywechat instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package php-cs-fixer/diff is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
Class App\Services\Data\Department\DataBoardRoomIdService located in ./app/Services/Data/Department/DataBoardRoomidService.php does not comply with psr-4 autoloading standard. Skipping.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: elfsundae/laravel-hashid
Discovered Package: fideloper/proxy
Discovered Package: fruitcake/laravel-cors
Discovered Package: intervention/image
Discovered Package: laravel/tinker
Discovered Package: maatwebsite/excel
Discovered Package: milon/barcode
Discovered Package: nesbot/carbon
Discovered Package: overtrue/laravel-wechat
Discovered Package: sentry/sentry-laravel
Discovered Package: shallowman/laralog
Discovered Package: tymon/jwt-auth
Package manifest generated successfully.
69 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Loading composer repositories with package information
Warning: Accessing gitlab.zz-med-stg.com over http which is an insecure protocol.

解决办法:

1、 升级composer版本

由composer v2.0.8升至 v2.5.2
composer self-update --stable

升级了版本之后,

In PluginManager.php line 738:
  php-http/discovery contains a Composer plugin which is blocked by your allo  
  w-plugins config. You may add it to the list if you consider it safe.        
  You can run "composer config --no-plugins allow-plugins.php-http/discovery   
  [true|false]" to enable it (true) or disable it explicitly and suppress thi  
  s exception (false)                                                          
  See https://getcomposer.org/allow-plugins                                    
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
ERROR: Job failed: command terminated with exit code 1
In PluginManager.php line 738:
  easywechat-composer/easywechat-composer contains a Composer plugin which is  
   blocked by your allow-plugins config. You may add it to the list if you co  
  nsider it safe.                                                              
  You can run "composer config --no-plugins allow-plugins.easywechat-composer  
  /easywechat-composer [true|false]" to enable it (true) or disable it explic  
  itly and suppress this exception (false)                                     
  See https://getcomposer.org/allow-plugins                                    
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
ERROR: Job failed: command terminated with exit code 1

2、升级后报错解决:

根据报错,在composer.json文件中添加对应插件

"config": {
        "allow-plugins": {
            "php-http/discovery": false,
            "easywechat-composer/easywechat-composer": false
				
本文主要讲解php项目中使用composer install 执行后报错 Your lock file does not contain a compatible set of packages. Please run composer update. 的解决方法和问题原因 日期:2021-7-6 作者:任聪聪 项目场景: 项目很久没有更新过扩展包 ,执行composer installcomposer update 均无法有效的执行和安装扩展包。 问题描述: 执行composer instal.
初步:安装代码 composer create-project apiadmin/apiadmin 你也可以:先获取基础代码 git clone https://gitee.com/apiadmin/ApiAdmin.git 再使用composer安装 composer install 第二步:检测环境以及配置数据库 php think apiadmin:install 第三步:完成数据迁移 php think migrate:run * 如出现报错:There are no commands defined in the "migrate" namespace. * 请先更新下think版本:composer update topthink/framework * 再执行:php think migrate:run * 特别鸣谢:@孙晔华
安装composer -vvv的参数是表示展示安装进度,测试时使用其他参数安装失败,一直卡着不动 curl -vvv https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer 先安装下git,才能clone下github上的代码 apt-get install git 在创建项目之前,要安装php的扩展和unzip命令,没有这几个扩展后面创建项目不成功 apt-get install php7.3-mbstring php7.3-zip apt-get install unzip
解决步骤: 1、分析问题是因为laravel5.1不赞成使用illuminate/html而推荐使用laravelcollective/html包,所以我们利用composer命令移除illuminate/html包再安装laravelcollective/html包 2、进入homestead虚拟机,移除包illuminate/html,执行命令: vagrant@homestead:...
执行composer install遇到错误:Your requirements could not be resolved to an installable set of packages.这是因为不匹配composer.json要求的版本。 提示我的PHP 7版本太高,不符合composer.json需要的版本,但是在PHP 7下应该也是可以运行的,composer可以设置忽略版本匹配,命令是: composer install --ignore-platform-reqs # or comp.
/bin/bash: line 112: ./gradlew: Permission denied ERROR: Job failed: command terminated with exit code 1 解决方案: git update-index --chmod=+x gradlew git add . git commit -m "修该执行脚本权限" git push ChiBot是RedElectricity开发的QQ机器人,隶属ChiAbility ChiBot QQ号:1654723334感谢湖精姐的湖精云托管ChiBot 新年了,各位注意啦! 祝大佬在新的一年: Windows开机蓝屏,Linux开机Kernel Panic,macos开机五国,服务器iDRAC/ iLO/IPMI/KVM全部失联,路由器全爆炸,路由表内存全溢出,交换机全环路,防火墙全阻断,无线信道全冲突,压接网线全短路,bgp全漏表,机柜全断电,raid全爆炸,nas数据全丢,光模块全炸,光纤全不通,光猫全烫手,电表全倒转,空开全烧穿。 祝各位群友新的一年: PHP全Fatal Error,fileinfo全装不上,npm/composer install报错,Laravel Mix全报未知错误,服务器全部宕机,电脑开机报错,Linux rm -rf /*,数据库D
执行composer install遇到错误: Your requirements could not be resolved to an installable set of packages. 这是因为不匹配composer.json要求的版本。 可以执行以下命令 $ composer install --ignore-platform-reqs $ composer update --ignore-platform-reqs