手动安装spark时出错
Error while installing spark manually
我已经下载了 spark v1.0.5 并解压缩到我的 laravel-项目根目录中,名称为 "spark" 然后我用存储库更新了我的 composer.json 文件以及要求和 laravel-项目的composer.json看起来像这样
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"daem0ndev/laravel-spark": "dev-master",
"intervention/image": "^2.3",
"felixkiss/uniquewith-validator": "2.*",
"laravel/cashier": "~6.0",
"laravel/spark": "~1.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"repositories": [
{
"type": "path",
"url": "./spark"
}
],
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\": "app/"
}
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
在此之后,当我从我的 laravel-项目目录中执行 运行 命令时
<pre>composer update</pre>
它显示以下错误
<pre>
php artisan clear-compiled
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.</p>
<p>Problem 1
- The requested package laravel/spark could not be found in any version, there may be a typo in the package name.</p>
<p>Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <a href="https://getcomposer.org/doc/04-schema.md#minimum-stability" rel="nofollow">https://getcomposer.org/doc/04-schema.md#minimum-stability</a> for more details.</p>
<p>Read <a href="https://getcomposer.org/doc/articles/troubleshooting.md" rel="nofollow">https://getcomposer.org/doc/articles/troubleshooting.md</a> for further common problems.
</pre>
我必须添加这个 "laravel/spark": "*@dev" ,详情请查看 here
我已经下载了 spark v1.0.5 并解压缩到我的 laravel-项目根目录中,名称为 "spark" 然后我用存储库更新了我的 composer.json 文件以及要求和 laravel-项目的composer.json看起来像这样
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"daem0ndev/laravel-spark": "dev-master",
"intervention/image": "^2.3",
"felixkiss/uniquewith-validator": "2.*",
"laravel/cashier": "~6.0",
"laravel/spark": "~1.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"repositories": [
{
"type": "path",
"url": "./spark"
}
],
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\": "app/"
}
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
在此之后,当我从我的 laravel-项目目录中执行 运行 命令时
<pre>composer update</pre>
它显示以下错误
<pre>
php artisan clear-compiled
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.</p>
<p>Problem 1
- The requested package laravel/spark could not be found in any version, there may be a typo in the package name.</p>
<p>Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <a href="https://getcomposer.org/doc/04-schema.md#minimum-stability" rel="nofollow">https://getcomposer.org/doc/04-schema.md#minimum-stability</a> for more details.</p>
<p>Read <a href="https://getcomposer.org/doc/articles/troubleshooting.md" rel="nofollow">https://getcomposer.org/doc/articles/troubleshooting.md</a> for further common problems.
</pre>
我必须添加这个 "laravel/spark": "*@dev" ,详情请查看 here