【发布时间】:2015-10-23 00:33:04
【问题描述】:
我正在尝试在我的项目中运行 composer install 但出现以下错误
[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)
我尝试运行 composer self-update 并出现此错误
[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。
我已尝试下载 http://curl.haxx.se/ca/cacert.pem 并使用以下内容更新了我的 php.ini 文件
curl.cainfo=/etc/ssl/certs/cacert.pem
openssl.cafile=/etc/ssl/certs/cacert.pem
openssl.capath=/etc/ssl/certs
运行 composer diagnostic 会返回这个
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() 返回
- 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
我完全不知道出了什么问题,更不知道如何调试它。
希望有人能帮帮我!
【问题讨论】:
标签: php ubuntu composer-php