dreamfactory常见问题汇总

Composer Install 依赖问题

报错缺少ext-mongodb依赖

root@iZ283foxixfZ:/var/www/df2# composer install --no-dev
Running composer as root/super user is highly discouraged as packages, plugins and scripts cannot always be trusted
Loading composer repositories with package information
Installing dependencies from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for mongodb/mongodb 1.0.2 -> satisfiable by mongodb/mongodb[1.0.2].
    - mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
  Problem 2
    - mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
    - jenssegers/mongodb v3.0.2 requires mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.2].
    - Installation request for jenssegers/mongodb v3.0.2 -> satisfiable by jenssegers/mongodb[v3.0.2].

  To enable extensions, verify that they are enabled in those .ini files:
    - /etc/php5/cli/php.ini
    - /etc/php5/cli/conf.d/05-opcache.ini
    - /etc/php5/cli/conf.d/10-pdo.ini
    - /etc/php5/cli/conf.d/20-apcu.ini
    - /etc/php5/cli/conf.d/20-curl.ini
    - /etc/php5/cli/conf.d/20-gd.ini
    - /etc/php5/cli/conf.d/20-json.ini
    - /etc/php5/cli/conf.d/20-mongo.ini
    - /etc/php5/cli/conf.d/20-mysql.ini
    - /etc/php5/cli/conf.d/20-mysqli.ini
    - /etc/php5/cli/conf.d/20-pdo_mysql.ini
    - /etc/php5/cli/conf.d/20-readline.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

问题分析

  1. php -m | grep “mongo”

正常显示mongo插件

  1. php –ini

正常显示20-mongo.ini插件

解决方案

apt-get install php5-dev

apt-get install libssl-dev

apt-get install pkg-config

pecl install mongodb

vim /etc/php5/cli/php.ini

# add this line
# extension = mongodb.so

composer install

composer install 缺少idehelper问题

https://github.com/barryvdh/laravel-ide-helper/issues/55

composer install
微信扫一扫交流

作者:ryanemax
微信关注:ryanemax (刘雨飏)
本文出处:https://www.futurestack.cn/faq/dreamfactory/
授权协议: CC BY-SA 4.0