无法运行作曲家安装 [英] Unable to run composer install
问题描述
我正在尝试在项目中运行composer安装,但出现以下错误
I'm trying to run composer install in my project but I have the following error
[Composer\Downloader\TransportException]
The "http://packagist.org/p/provider-2013$43e3f41fbe30a46245103451248f688a727f076a6e90636d19a69a156c17a416.json" file could not be downloaded (HTTP/1.1 400 Received invalid request from Client)
我尝试运行作曲家自我更新并出现此错误
I have tried to run composer self-update and have this error
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: Failed to enable crypto failed to open stream: operation failed
我正在Ubuntu 15.04上运行apache / php5.6.4 / mysql,位于代理后面。
I'm running Ubuntu 15.04 with apache/php5.6.4/mysql behind a proxy.
我尝试下载 http:// curl。 haxx.se/ca/cacert.pem 并使用以下内容更新了我的php.ini文件
I have tried downloading http://curl.haxx.se/ca/cacert.pem and updated my php.ini file with the following
curl.cainfo=/etc/ssl/certs/cacert.pem
openssl.cafile=/etc/ssl/certs/cacert.pem
openssl.capath=/etc/ssl/certs
正在运行的作曲家诊断返回此结果
Running composer diagnose returns this
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Received invalid request from Client)
Checking https connectivity to packagist: OK
Checking HTTP proxy: OK
Checking HTTP proxy support for request_fulluri: FAIL
Unable to assess the situation, maybe packagist.org is down (The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Received invalid request from Client))
Checking HTTPS proxy support for request_fulluri: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: FAIL
You are not running the latest version
最后,openssl_get_cert_locations()返回
And finally openssl_get_cert_locations() returns
- default_cert_file:/usr/lib/ssl/cert.pem
- default_cert_file_env:SSL_CERT_FILE
- default_cert_dir:/ usr / lib / ssl / certs
- default_cert_dir_env:SSL_CERT_DIR
- default_private_dir:/ usr / lib / ssl /私人
- default_default_cert_area:/ usr / lib / ssl
- ini_cafile:/etc/ssl/certs/cacert.pem
- ini_capath:/ etc / ssl / certs
- default_cert_file: /usr/lib/ssl/cert.pem
- default_cert_file_env: SSL_CERT_FILE
- default_cert_dir: /usr/lib/ssl/certs
- default_cert_dir_env: SSL_CERT_DIR
- default_private_dir: /usr/lib/ssl/private
- default_default_cert_area: /usr/lib/ssl
- ini_cafile: /etc/ssl/certs/cacert.pem
- ini_capath: /etc/ssl/certs
我对什么是错误,甚至如何失败一无所知我可以调试它。
I'm at a total loss as to what's wrong and even more how I can debug this.
我希望外面有人可以帮助我!
I hope there's someone out there can help me!
推荐答案
与您相同。我找到了在Internet上解决此问题的方法(针对窗口10)。
1-转到文件夹
PATH\xampp\apache
并运行makecert.bat
2-将此脚本添加到composer中。 json文件
same with you. and i found the way to resolve it (for window 10) on internet.
1 - go to folder
PATH\xampp\apache
and run makecert.bat
2 - add this script to composer.json file
"repositories": [
{
"type": "composer",
"url": "https://packagist.org"
},
{
"packagist": false
}
]
这篇关于无法运行作曲家安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!