dounieqi6959 2014-04-13 11:39
浏览 81

在HHVM中加载php扩展

I wanted to use hhvm to speed up the process of installing composer updates. Everything was fine until I wanted to install doctrine/mongodb-odm, which requires the mongodb php extension. I get the following output:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - doctrine/mongodb-odm 1.0.x-dev requires doctrine/mongodb >=1.1.5,<2.0 -> satisfiable by doctrine/mongodb[1.2.x-dev, 1.1.5, 1.1.x-dev].
    - doctrine/mongodb-odm 1.0.x-dev requires doctrine/mongodb >=1.1.5,<2.0 -> satisfiable by doctrine/mongodb[1.2.x-dev, 1.1.5, 1.1.x-dev].
    - doctrine/mongodb 1.2.x-dev requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
    - doctrine/mongodb 1.1.x-dev requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
    - doctrine/mongodb 1.1.5 requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
    - doctrine/mongodb 1.2.x-dev requires ext-mongo >=1.2.12,<1.6-dev -> the requested PHP extension mongo is missing from your system.
    - Installation request for doctrine/mongodb-odm 1.0.x-dev -> satisfiable by doctrine/mongodb-odm[1.0.x-dev].

If I run composer update using just php-cli, it works fine (as I have the mongo extension installed). But hhvm is not detecting the extension.

I've tried adding the following line to the hhvm php.ini without any luck (both like this and with full path)

extension=mongo.so

Is there a way to use it? Or should I use it just for dependencies that not require php extensions?

  • 写回答

1条回答 默认 最新

  • douti8321 2014-10-30 11:53
    关注

    HHVM uses a different set of extensions than the regular PHP, so you have two options:

    If you are just using HHVM for composer, and so don't need Mongo available to HHVM directly, you can use composer's --ignore-platform-reqs option which will skip that particular check.

    Alternatively, as has been mentioned there are HHVM Mongo extensions emerging, but they aren't fully featured or mature yet so if you are only using composer then it's a lot of extra effort for no real gain.

    评论

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法