我想安装Laravel 4 User Agent我在"jenssegers/agent": "*"
部分添加required
。运行此命令后出现此错误。
composer update
结果:
Loading composer repositories with package information
Updating dependencies (including require-dev)
[Composer\Downloader\TransportException]
The "http://packagist.org/p/symfony/event-dispatcher$db57a4209d50296c5b7b06f4c34cd7e3ba3f2e0e02ec4c687917a2ccbac7faca.json" file could not be downloaded: php_network_getaddresses: getaddr
info failed: Name or service not known
failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
我的composer.json内容:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.1.*",
"jenssegers/agent": "*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}