![](/img/trans.png)
[英]Laravel 4.2 Composer install error: “could not scan for classes”
[英]laravel 4.2 Composer install error
每当我尝试 composer install 时,我都会收到错误消息。 以下是我在终端上看到的内容。 我试图降低收银台版本。 我试过另一个 Laravel 项目。 我一直收到同样的错误,不知道发生了什么。
composer.json
{
"name": "andrew13/Laravel-4-Bootstrap-Starter-Site",
"description": "Laravel 4 Starter Site",
"keywords": ["laravel", "Starter Site"],
"license": "MIT",
"authors": [
{
"name": "Andrew Elkins",
"homepage": "http://www.andrewelkins.com"
}
],
"require": {
"laravel/framework": "~4.2",
"zizaco/confide": "~3.2",
"zizaco/entrust": "~1.2",
"bllim/datatables": "~1.3",
"laravel/cashier": "~2.0"
},
"require-dev": {
"way/generators": "~2.6",
"phpunit/phpunit": "~4.0",
"mockery/mockery": "~0.9",
"summerstreet/woodling": "~0.1.6",
"barryvdh/laravel-ide-helper": "~1.11"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/library",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/library"
],
"psr-0": {
"Acme": "app/"
}
},
"scripts": {
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-install-cmd": [
"php artisan optimize"
],
"post-update-cmd": [
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
终端上的错误
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/cashier v2.0.0 requires stripe/stripe-php ~1.9 -> satisfiable by stripe/stripe-php[v1.10.1, v1.11.0, v1.12.0, v1.13.0, v1.13.1, v1.14.1, v1.15.0, v1.16.0, v1.17.0, v1.17.1, v1.17.2, v1.17.3, v1.17.4, v1.17.5, v1.18.0, v1.9.0, v1.9.1].
- laravel/cashier v2.0.1 requires stripe/stripe-php ~1.9 -> satisfiable by stripe/stripe-php[v1.10.1, v1.11.0, v1.12.0, v1.13.0, v1.13.1, v1.14.1, v1.15.0, v1.16.0, v1.17.0, v1.17.1, v1.17.2, v1.17.3, v1.17.4, v1.17.5, v1.18.0, v1.9.0, v1.9.1].
- laravel/cashier v2.0.2 requires stripe/stripe-php ~1.9 -> satisfiable by stripe/stripe-php[v1.10.1, v1.11.0, v1.12.0, v1.13.0, v1.13.1, v1.14.1, v1.15.0, v1.16.0, v1.17.0, v1.17.1, v1.17.2, v1.17.3, v1.17.4, v1.17.5, v1.18.0, v1.9.0, v1.9.1].
- laravel/cashier v2.0.3 requires stripe/stripe-php ~1.9 -> satisfiable by stripe/stripe-php[v1.10.1, v1.11.0, v1.12.0, v1.13.0, v1.13.1, v1.14.1, v1.15.0, v1.16.0, v1.17.0, v1.17.1, v1.17.2, v1.17.3, v1.17.4, v1.17.5, v1.18.0, v1.9.0, v1.9.1].
- laravel/cashier v2.0.4 requires stripe/stripe-php ~1.9 -> satisfiable by stripe/stripe-php[v1.10.1, v1.11.0, v1.12.0, v1.13.0, v1.13.1, v1.14.1, v1.15.0, v1.16.0, v1.17.0, v1.17.1, v1.17.2, v1.17.3, v1.17.4, v1.17.5, v1.18.0, v1.9.0, v1.9.1].
- laravel/cashier v2.0.5 requires stripe/stripe-php ~1.9 -> satisfiable by stripe/stripe-php[v1.10.1, v1.11.0, v1.12.0, v1.13.0, v1.13.1, v1.14.1, v1.15.0, v1.16.0, v1.17.0, v1.17.1, v1.17.2, v1.17.3, v1.17.4, v1.17.5, v1.18.0, v1.9.0, v1.9.1].
- laravel/cashier v2.0.6 requires stripe/stripe-php ~1.9 -> satisfiable by stripe/stripe-php[v1.10.1, v1.11.0, v1.12.0, v1.13.0, v1.13.1, v1.14.1, v1.15.0, v1.16.0, v1.17.0, v1.17.1, v1.17.2, v1.17.3, v1.17.4, v1.17.5, v1.18.0, v1.9.0, v1.9.1].
- laravel/cashier v2.0.7 requires stripe/stripe-php ~1.9 -> satisfiable by stripe/stripe-php[v1.10.1, v1.11.0, v1.12.0, v1.13.0, v1.13.1, v1.14.1, v1.15.0, v1.16.0, v1.17.0, v1.17.1, v1.17.2, v1.17.3, v1.17.4, v1.17.5, v1.18.0, v1.9.0, v1.9.1].
- stripe/stripe-php v1.9.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.9.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.18.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.17.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.17.4 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.17.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.17.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.17.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.17.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.16.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.15.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.14.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.13.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.13.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.12.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.11.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v1.10.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- Installation request for laravel/cashier ~2.0.0 -> satisfiable by laravel/cashier[v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7].
在您的系统上安装并启用ext-curl
。
sudo apt-get install php5-curl
此错误的快速解决方案
首先安装所需的php扩展
接下来运行这个命令
composer install --ignore-platform-reqs
此命令不考虑操作系统或平台
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.