Debian 编写器安装xhp库超时

Debian 编写器安装xhp库超时,debian,composer-php,hhvm,xhp,Debian,Composer Php,Hhvm,Xhp,我只是一直在努力让作曲家工作。我使用的是Debian Jessie,我对linux和所有这些东西都很陌生 所以,我下载并安装了HHVM,一切正常。我创建了一个json文件,如下所示: { "require": { "facebook/xhp-lib": "~2.2" }, "config": { "secure-http": false, "process-timeout": 1800 } } 我仍然通过composer安装获

我只是一直在努力让作曲家工作。我使用的是Debian Jessie,我对linux和所有这些东西都很陌生

所以,我下载并安装了HHVM,一切正常。我创建了一个json文件,如下所示:

{
    "require": {
      "facebook/xhp-lib": "~2.2"
    },
    "config": {
      "secure-http": false,
      "process-timeout": 1800
    }
}
我仍然通过
composer安装获得此结果:

Loading composer repositories with package information
Updating dependencies (including require-dev)
SlowTimer [60000ms] at curl: http://packagist.org/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json
The "http://packagist.org/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json" file could not be downloaded: Failed to open http://packagist.org/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json (Operation timed out after 59964 milliseconds with 636857 out of 857622 bytes received)
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
SlowTimer [60001ms] at curl: http://87.98.253.214/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json
SlowTimer [59999ms] at curl: http://87.98.253.214/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json
SlowTimer [59999ms] at curl: http://87.98.253.214/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json


  [Composer\Downloader\TransportException]                                     
  The "http://packagist.org/p/provider-2014%246e256ac757a31949f2560c57b83ff57  
  649232e226864f330c6556e4134ee5d52.json" file could not be downloaded: Faile  
  d to open http://87.98.253.214/p/provider-2014%246e256ac757a31949f2560c57b8  
  3ff57649232e226864f330c6556e4134ee5d52.json (Operation timed out after 5967  
  4 milliseconds with 745452 out of 857622 bytes received)                     


install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
使用包信息加载composer存储库
更新依赖项(包括需要开发人员)
卷曲时的慢定时器[60000ms]:http://packagist.org/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json
"http://packagist.org/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json“无法下载文件:无法打开。”http://packagist.org/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json (操作在59964毫秒后超时,收到857622字节中的636857字节)
在降级模式下重试,请检查https://getcomposer.org/doc/articles/troubleshooting.md#degraded-模式获取更多信息
卷曲时的慢定时器[60001ms]:http://87.98.253.214/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json
卷曲时的慢定时器[59999ms]:http://87.98.253.214/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json
卷曲时的慢定时器[59999ms]:http://87.98.253.214/p/provider-2014%246e256ac757a31949f2560c57b83ff57649232e226864f330c6556e4134ee5d52.json
[Composer\Downloader\TransportException]
"http://packagist.org/p/provider-2014%246e256ac757a31949f2560c57b83ff57  
无法下载649232e226864f330c6556e4134ee5d52.json“文件:Faile
开http://87.98.253.214/p/provider-2014%246e256ac757a31949f2560c57b8  
3ff57649232e226864f330c6556e4134ee5d52.json(操作在5967之后超时
4毫秒,接收到857622字节中的745452字节)
安装[--首选源代码][--首选区][--干运行][--开发][--无开发][--无插件][--无自定义安装程序][--无自动加载程序][--无脚本][--无进度]-[v | vv | vvv | verbose][--o |--优化自动加载程序][--类映射权威][--忽略平台需求][]。。。
我有一个10Mbps的连接,但它似乎没有被100%使用。我希望你们能帮我解决这个问题

PS:如果有其他方法将XHP集成到HHVM,请告诉我,我一定会尝试


PS:很抱歉英语不好。

所以我通过HHVM运行composer来实现这一点。我不知道这是否能帮助您,但它对我来说很有效

请记住,我的错误是由于连接问题造成的,因此我得到了

[Composer\Downloader\TransportException]…操作超时

强制HHVM配置选项ResourceLimit.SocketDefaultTimeout&Http.SlowQueryThreshold为更高的值将有助于实现这一点


  • 使用您喜欢的文本编辑器打开~/.bashrc,如so
    sudo nano~/.bashrc:

  • 添加此行:
    alias composer=“hhvm-v ResourceLimit.SocketDefaultTimeout=180-v Http.SlowQueryThreshold=300000/usr/local/bin/composer”

  • 保存并退出文件
  • 运行
    source~/.bashrc
  • 然后为您的项目运行composer

    PS:该别名的值非常高,不会花那么长时间,因此请根据您的需要进行调整。