$ Composer can't find mongodb extension, required Mongodb extension

前端 未结 3 1883
夕颜
夕颜 2021-02-06 08:49

I\'m using with latest php version 7.2 on macOS Mojave and receiving error like

 $composer require mongodb/mongodb
Using version ^1.4 for mongodb/mongodb
./comp         


        
3条回答
  •  暖寄归人
    2021-02-06 09:29

    composer require mongodb/mongodb --ignore-platform-reqs

    composer require mongodb/mongodb --ignore-platform-reqs
    composer require jenssegers/mongodb --ignore-platform-reqs
    
    Using version ^3.4 for jenssegers/mongodb
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 2 installs, 0 updates, 0 removals
      - Installing mongodb/mongodb (1.4.2): Downloading (100%)         
      - Installing jenssegers/mongodb (v3.4.5): Downloading (100%)         
    jenssegers/mongodb suggests installing jenssegers/mongodb-session (Add MongoDB session support to Laravel-MongoDB)
    jenssegers/mongodb suggests installing jenssegers/mongodb-sentry (Add Sentry support to Laravel-MongoDB)
    Writing lock file
    Generating optimized autoload files
    

    composer require jenssegers/mongodb --ignore-platform-reqs It solved my problem.

提交回复
热议问题