我尝试了与我的问题相关的其他帖子,但这些帖子均无效。 我的计算机具有代理,XAMPP和Composer。当我尝试键入:
撰写者需要“ laravelcollective / html”:“ ^ 5.4.0”
它显示以下消息:
[Composer \ Downloader \ TransportException]
无法下载“ https://packagist.org/packages.json”文件:php_network_getaddresses:getaddrinfo失败
d:没有这样的主机。
无法打开流:php_network_getaddresses:getaddrinfo失败:此类主机未知。
根据帖子(Composer cannot download files),我为代理设置了一个变量,但它也不起作用 (https://github.com/composer/composer/issues/3611) (Laravel 5 Class 'Collective\Html\HtmlServiceProvider' not found on AWS)
HTTP_PROXY =“ http://mcd-server/mcd/proxy.pac”编写器需要“ laravelcollective / html”:“ ^ 5.4.0
我也尝试手动添加laravelcollective,但是没有用。 JSON文件:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "5.4.*"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.7"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-root-package-install": [
"php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
}
}
我还能做什么?