简体   繁体   English

Composer更新给出错误,提示无法初始化插件,找不到每个软件包的类

[英]Composer update gives error saying plugin could not be initialized, class not found for every package

I've loaded up a vagrant box from scratch with an existing codebase that has been running on several machines for quite a while. 我从头开始使用一个已经在多台计算机上运行了一段时间的现有代码库加载了一个无所事事的盒子。 When running composer update it always gives a similar issue: 运行composer update时,总是会出现类似的问题:

  - Removing kylekatarnls/update-helper (1.1.1)


  [UnexpectedValueException]
  Plugin kylekatarnls/update-helper could not be initialized, class not found: UpdateHelper\ComposerPlugin

php -v: php -v:

Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.30-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.7.1, Copyright (c) 2002-2019, by Derick Rethans

Composer version 1.8.6 作曲者版本1.8.6

I've tried changing versions of vagrant, virtualbox, php, xdebug, composer all to match versions running on other machines. 我试过更改vagrant,virtualbox,php,xdebug,composer的版本,以匹配在其他计算机上运行的版本。 I've tried composer clearcache, composer dump-autoload, various different composer update methods. 我尝试过作曲家clearcache,作曲家转储自动加载,各种不同的作曲家更新方法。 Have tried deleting vendor folder and doing composer install 尝试删除供应商文件夹并进行作曲家安装

I had this issue in a Vagrant box, I removed php7.2-zip from installing and installed ONLY zip. 我在“游民游”框中遇到了此问题,我从安装中删除了php7.2-zip,仅安装了zip。

If I have them both installed, it fails, if I install only php-zip it failed. 如果同时安装了它们,则失败;如果仅安装php-zip,则失败。 Not sure if this will help, but might give it a try. 不知道这是否会有所帮助,但可以尝试一下。

运行composer update --no-plugins

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM