Home > Backend Development > PHP Tutorial > Composer install or update error resolution solidworks composer laravel avid media composer

Composer install or update error resolution solidworks composer laravel avid media composer

WBOY
Release: 2016-07-29 08:55:21
Original
1501 people have browsed it

Failed to decode response: zlib_decode(): data error
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info

composer image does not support https cause

Open the command line window (windows users) or console ( Linux, Mac users), enter the root directory of your project (that is, the directory where the composer.json file is located) and execute the following command:

composer config repo.packagist composer https://packagist.phpcomposer.com
The above command will automatically add the image configuration information at the end of the composer.json file in the current project (you can also add it manually):

"repositories": {
"packagist": {
"type": "composer",
“url”: “https://packagist.phpcomposer.com”
}
}
Taking the composer.json configuration file of the laravel project as an example, after executing the above command, it will look as follows (note the last few lines):

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
“license”: “MIT”,
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*"
},
"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."
},
"autoload": {
"classmap": [
“database”
],
"psr-4": {
"App": "app/"
}
},
"autoload-dev": {
"classmap": [
“tests/TestCase.php”
]
},
"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”
},
"repositories": {
"packagist": {
"type": "composer",
“url”: “https://packagist.phpcomposer.com”
}
}
}
OK, everything is done! Try composer install to experience the incredible speed!

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces how to solve composer install or update error problems, including composer aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template