Error installing XHP with composer

2019-07-27 07:38发布

问题:

I'm trying to install XHP on OSX using composer. I have a directory with composer.phar and composer.json. My composer.json file looks like this:

{
    "require": {
            "facebook/xhp-lib": "~2.2"
    }
}

I also installed the latest version of HHVM. I tried running

hhvm composer.phar install --verbose

but got the following error:

[ErrorException]    
  Undefined index: 0  



Exception trace:
 () at phar://composer.phar/bin/../src/../vendor/symfony/process/Pipes/AbstractPipes.php:140
 Composer\Util\ErrorHandler::handle() at phar://composer.phar/bin/../src/../vendor/symfony/process/Pipes/AbstractPipes.php:140
 Symfony\Component\Process\Pipes\AbstractPipes->write() at phar://composer.phar/bin/../src/../vendor/symfony/process/Pipes/UnixPipes.php:98
 Symfony\Component\Process\Pipes\UnixPipes->readAndWrite() at phar://composer.phar/bin/../src/../vendor/symfony/process/Process.php:1359
 Symfony\Component\Process\Process->readPipes() at phar://composer.phar/bin/../src/../vendor/symfony/process/Process.php:1279
 Symfony\Component\Process\Process->updateStatus() at phar://composer.phar/bin/../src/../vendor/symfony/process/Process.php:305
 Symfony\Component\Process\Process->start() at phar://composer.phar/bin/../src/../vendor/symfony/process/Process.php:201
 Symfony\Component\Process\Process->run() at phar://composer.phar/bin/../src/../src/Composer/Util/ProcessExecutor.php:68
 Composer\Util\ProcessExecutor->execute() at phar://composer.phar/bin/../src/../src/Composer/Package/Version/VersionGuesser.php:88
 Composer\Package\Version\VersionGuesser->guessGitVersion() at phar://composer.phar/bin/../src/../src/Composer/Package/Version/VersionGuesser.php:67
 Composer\Package\Version\VersionGuesser->guessVersion() at phar://composer.phar/bin/../src/../src/Composer/Package/Loader/RootPackageLoader.php:76
 Composer\Package\Loader\RootPackageLoader->load() at phar://composer.phar/bin/../src/../src/Composer/Factory.php:332
 Composer\Factory->createComposer() at phar://composer.phar/bin/../src/../src/Composer/Factory.php:552
 Composer\Factory::create() at phar://composer.phar/bin/../src/../src/Composer/Console/Application.php:308
 Composer\Console\Application->getComposer() at phar://composer.phar/bin/../src/../src/Composer/Console/Application.php:420
 Composer\Console\Application->getPluginCommands() at phar://composer.phar/bin/../src/../src/Composer/Console/Application.php:131
 Composer\Console\Application->doRun() at phar://composer.phar/bin/../src/../vendor/symfony/console/Application.php:123
 Symfony\Component\Console\Application->run() at phar://composer.phar/bin/../src/../src/Composer/Console/Application.php:102
 Composer\Console\Application->run() at phar://composer.phar/bin/composer:43
 include() at /Users/chrisapa/Sites/project1/composer.phar:24

I'm not sure what to do from here.