1)使用以下命令通过Putty在我的Qnap NAS上安装Composer:
curl -sS -k https://getcomposer.org/installer | /mnt/ext/opt/apache/bin/php -d detect_unicode=Off
2)更新了作曲家:
/mnt/ext/opt/apache/bin/php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta4"
3)已安装Yii2:
/mnt/ext/opt/apache/bin/php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.3
已创建高级文件夹,但没有vendor
文件夹。 Composer会出现以下错误:
- 加载作曲家存储库
使用包信息
更新依赖项(包括require-dev)
[ErrorException]未定义索引:所有者
更新 -vvv错误
Exception trace:
() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/Repository/Vcs/GitHubDriver.php:409
Composer\Util\ErrorHandler::handle() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/Repository/Vcs/GitHubDriver.php:409
Composer\Repository\Vcs\GitHubDriver->fetchRootIdentifier() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/Repository/Vcs/GitHubDriver.php:61
Composer\Repository\Vcs\GitHubDriver->initialize() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/Repository/VcsRepository.php:86
Composer\Repository\VcsRepository->getDriver() at /root/.composer/vendor/fxp/composer-asset-plugin/Repository/AbstractAssetVcsRepository.php:118
Fxp\Composer\AssetPlugin\Repository\AbstractAssetVcsRepository->initDriver() at /root/.composer/vendor/fxp/composer-asset-plugin/Repository/AssetVcsRepository.php:38
Fxp\Composer\AssetPlugin\Repository\AssetVcsRepository->initialize() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/Repository/ArrayRepository.php:170
Composer\Repository\ArrayRepository->getPackages() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/DependencyResolver/Pool.php:104
Composer\DependencyResolver\Pool->addRepository() at /root/.composer/vendor/fxp/composer-asset-plugin/Repository/Util.php:58
Fxp\Composer\AssetPlugin\Repository\Util::addRepositoryInstance() at /root/.composer/vendor/fxp/composer-asset-plugin/Repository/Util.php:39
Fxp\Composer\AssetPlugin\Repository\Util::addRepository() at /root/.composer/vendor/fxp/composer-asset-plugin/Repository/AbstractAssetsRepository.php:139
Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository->whatProvides() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/DependencyResolver/Pool.php:191
Composer\DependencyResolver\Pool->computeWhatProvides() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/DependencyResolver/Pool.php:180
Composer\DependencyResolver\Pool->whatProvides() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php:161
Composer\DependencyResolver\RuleSetGenerator->whitelistFromPackage() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php:273
Composer\DependencyResolver\RuleSetGenerator->whitelistFromJobs() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php:324
Composer\DependencyResolver\RuleSetGenerator->getRulesFor() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/DependencyResolver/Solver.php:172
Composer\DependencyResolver\Solver->solve() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/Installer.php:505
Composer\Installer->doInstall() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/Installer.php:230
Composer\Installer->run() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/Command/UpdateCommand.php:140
Composer\Command\UpdateCommand->execute() at phar:///share/MD0_DATA/Web/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at phar:///share/MD0_DATA/Web/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at phar:///share/MD0_DATA/Web/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/Console/Application.php:146
Composer\Console\Application->doRun() at phar:///share/MD0_DATA/Web/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at phar:///share/MD0_DATA/Web/composer.phar/src/Composer/Console/Application.php:83
Composer\Console\Application->run() at phar:///share/MD0_DATA/Web/composer.phar/bin/composer:43
require() at /share/MD0_DATA/Web/composer.phar:25