我正在尝试设置一个新的laravel项目但是作曲家抛出了一个奇怪的错误.Mine是Windows 8
机器
这是堆栈跟踪
composer diagnose -vvv
Reading ./composer.json
Loading config file ./composer.json
Executing command (C:\wamp\www\knowShare): git describe --exact-match --tags
Reading ./composer.json
Loading config file ./composer.json
Executing command (C:\wamp\www\knowShare): git describe --exact-match --tags
[ErrorException]
fopen(): Filename cannot be empty
Exception trace:
() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Pipes/WindowsPipes.php:55
Composer\Util\ErrorHandler::handle() at n/a:n/a
fopen() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Pipes/WindowsPipes.php:55
Symfony\Component\Process\Pipes\WindowsPipes->__construct() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Pipes/WindowsPipes.php:172
Symfony\Component\Process\Pipes\WindowsPipes::create() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:1264
Symfony\Component\Process\Process->getDescriptors() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:273
Symfony\Component\Process\Process->start() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/process/Symfony/Component/Process/Process.php:208
Symfony\Component\Process\Process->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Util/ProcessExecutor.php:62
Composer\Util\ProcessExecutor->execute() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Package/Version/VersionGuesser.php:84
Composer\Package\Version\VersionGuesser->guessGitVersion() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Package/Version/VersionGuesser.php:65
Composer\Package\Version\VersionGuesser->guessVersion() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Package/Loader/RootPackageLoader.php:68
Composer\Package\Loader\RootPackageLoader->load() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Factory.php:270
Composer\Factory->createComposer() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Factory.php:490
Composer\Factory::create() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:225
Composer\Console\Application->getComposer() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/Command.php:53
Composer\Command\Command->getComposer() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Command/DiagnoseCommand.php:59
Composer\Command\DiagnoseCommand->execute() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
Symfony\Component\Console\Command\Command->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:147
Composer\Console\Application->doRun() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Console/Application.php:82
Composer\Console\Application->run() at phar://C:/ProgramData/ComposerSetup/bin/composer.phar/bin/composer:43
require() at C:\ProgramData\ComposerSetup\bin\composer.phar:25
diagnose
php -r "var_dump(tempnam(sys_get_temp_dir(), 'sf_proc_stdout'));"
这会输出bool false
我提到并尝试了与sys_temp_dir
相关的解决方案,但没有解决问题https://github.com/composer/composer/issues/3835
还有什么可以导致它,不确定堆栈跟踪。任何输入都会有帮助