-1

我对 Composer 的失败感到困惑。任何人都可以帮忙吗?我所看到的关于“信号 9”的唯一事情与资源限制有关,而我没有。看起来 require() 失败了?

我有一个新的基于 M1 的 macbook air,运行 PHP8.0.0并安装了 Composer (v2.0.8),两者都使用homebrew. 我正在尝试创建一个新的 Cakephp 项目。

我已经安装并运行了 git。

当我运行时: composer -vvv create-project --prefer-dist cakephp/app projectname

Composer 因 Symfony 运行时异常而失败signal 9- 如下所示:

composer -vvv create-project --prefer-dist cakephp/app projectname

Reading ./composer.json (/Users/xxxxxxx/Dropbox/Development/git/sites/composer.json)
Loading config file ./composer.json (/Users/xxxxxxx/Dropbox/Development/git/sites/composer.json)
Checked CA file /opt/homebrew/etc/openssl@1.1/cert.pem: valid
Executing command (/Users/xxxxxx/Dropbox/Development/git/sites): git branch -a --no-color --no-abbrev -v

                                                          
  [Symfony\Component\Process\Exception\RuntimeException]  
  The process has been signaled with signal "9".          
                                                          

Exception trace:
 () at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/vendor/symfony/process/Process.php:366
 Symfony\Component\Process\Process->wait() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/vendor/symfony/process/Process.php:198
 Symfony\Component\Process\Process->run() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Util/ProcessExecutor.php:125
 Composer\Util\ProcessExecutor->doExecute() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Util/ProcessExecutor.php:65
 Composer\Util\ProcessExecutor->execute() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Package/Version/VersionGuesser.php:122
 Composer\Package\Version\VersionGuesser->guessGitVersion() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Package/Version/VersionGuesser.php:71
 Composer\Package\Version\VersionGuesser->guessVersion() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Package/Loader/RootPackageLoader.php:81
 Composer\Package\Loader\RootPackageLoader->load() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Factory.php:368
 Composer\Factory->createComposer() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Factory.php:595
 Composer\Factory::create() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Console/Application.php:409
 Composer\Console\Application->getComposer() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Console/Application.php:527
 Composer\Console\Application->getPluginCommands() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Console/Application.php:187
 Composer\Console\Application->doRun() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/vendor/symfony/console/Application.php:117
 Symfony\Component\Console\Application->run() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/src/Composer/Console/Application.php:122
 Composer\Console\Application->run() at phar:///opt/homebrew/Cellar/composer/2.0.8/bin/composer/bin/composer:63
 require() at /opt/homebrew/Cellar/composer/2.0.8/bin/composer:24
4

1 回答 1

0

这解决了。我使用 Homebrew 重新安装了 git。一旦我这样做了,作曲家就工作了。提示我的是运行“brew update”并获得:

错误:执行失败;git config --replace-all homebrew.analyticsmessage true被未捕获的信号 KILL 终止。

我认为 git 不知何故坏了(奇怪,因为我一直在使用它。)所以我重新安装了它。

于 2021-01-28T01:24:56.823 回答