在作曲家上安装 Yii 作曲家资产插件
Installing Yii composer asset plugin on composer
我正在尝试在 windows 32 位作曲家上安装 "fxp/composer-asset-plugin:^1.2.0" 但总是失败。
这是消息
Installation failed, reverting ./composer.json to its original content.
[Composer\Downloader\TransportException]
Content-Length mismatch
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress]
[--no-suggest] [--no-update] [--no-scripts] [--update-no-dev]
[--update-with-dependencies] [--ignore-platform-reqs]
[--prefer-stable] [--prefer-lowest] [--sort-packages]
[-o|--optimize-autoloader] [-a|--classmap-authoritative]
[--apcu-autoloader] [--] []...
有人知道这里有什么问题吗?请帮忙
谢谢
您应该首先使用
更新作曲家
composer selfupdate
并且可以肯定的是,您在全局安装 "fxp/composer-asset-plugin",就像 official install guide 说的:
composer global require "fxp/composer-asset-plugin:^1.2.0"
如果您使用的是 windows,请尝试从 cmd "as Administator" 中 运行ning composer。澄清一下,如果您有权访问全局目录,运行
composer global show -s
并手动检查输出目录
我正在尝试在 windows 32 位作曲家上安装 "fxp/composer-asset-plugin:^1.2.0" 但总是失败。 这是消息
Installation failed, reverting ./composer.json to its original content.
[Composer\Downloader\TransportException]
Content-Length mismatchrequire [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []...
有人知道这里有什么问题吗?请帮忙 谢谢
您应该首先使用
更新作曲家composer selfupdate
并且可以肯定的是,您在全局安装 "fxp/composer-asset-plugin",就像 official install guide 说的:
composer global require "fxp/composer-asset-plugin:^1.2.0"
如果您使用的是 windows,请尝试从 cmd "as Administator" 中 运行ning composer。澄清一下,如果您有权访问全局目录,运行
composer global show -s
并手动检查输出目录