laravel 中 使用 composer 的中国镜像安装时报错(找不到包)

composer require jenssegers/mongodb


安装mongodb时报错:


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

更新了一下composer版本(命令:composer selfupdate)。






然后报错:


[ErrorException]

rename(/home/www/.composer/cache/composer-temp.phar,/usr/local/bin/composer): Permission denied


手动执行 
    mv  /home/www/.composer/cache/composer-temp.phar  /usr/local/bin/composer



报错:

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



执行:

    composer require jenssegers/mongodb --ignore-platform-reqs
安装成功

你可能感兴趣的:(PHP,mongodb,laravel,composer)