thinkphp5.0安装phpword扩展失败,怎么办?

报以下错误:

Running composer update phpoffice/phpword
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - topthink/think-installer v1.0.12 requires composer-plugin-api ^1.0 -> foun
d composer-plugin-api[2.0.0] but it does not match the constraint.
    - topthink/framework v5.0.21 requires topthink/think-installer ~1.0 -> satis
fiable by topthink/think-installer[v1.0.12].
    - topthink/framework is locked to version v5.0.21 and an update of this pack
age was not requested.

You are using Composer 2, which some of your plugins seem to be incompatible wit
h. Make sure you update your plugins or report a plugin-issue to ask them to sup
port Composer 2.

Installation failed, reverting ./composer.json and ./composer.lock to their orig
inal content.

image

阅读 4.1k
2 个回答

有包不支持你的 composer 2,需要用 composer 1 安装

composer self-update --1

安装 composer 1,若要安装 composer 2 可使用

composer self-update --2
新手上路,请多包涵

使用composer self-update --1降版本后提示,咋整
image

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题