はまった
composer.json
{
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net/"
}
],
"require": {
"pear-pear.php.net/PEAR" : "*",
"pear-pear.php.net/HTTP_Request2": "*"
}
}
$ php composer.phar install
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
PEAR repository from http://pear.php.net could not be loaded. Your configuration does not allow connection to http://http://pear.php.net. See https://getcomposer.org/doc/06-config.md#secure-http for details.
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package pear-pear.php.net/mail_mime could not be found in any version, there may be a typo in the package name.
Problem 2
- The requested package pear-pear.php.net/http_request2 could not be found in any version, there may be a typo in the package name.
Problem 3
- The requested package pear-pear.php.net/mail_mimedecode could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
エラーがでる。
Mac OS Xのbrewで入れたcomposerだとうまく行くのに、CentOS6.7だとうまく行かない。
修正
httpじゃないとダメだよ、ということだったのでsecure-httpオプションをオフに
composer.json
{
"config": {
"secure-http": false
},
"repositories": [
{
"type": "pear",
"url": "https://pear.php.net/"
}
],
"require": {
"pear-pear.php.net/PEAR" : "*",
"pear-pear.php.net/http_request2": "*"
}
}
$ php composer.phar install
うまく行きました。composerのバージョンかと思います。
その他
他のオープンソースなプロジェクトのcomposer.jsonで同様の
と言われてしまいました。
Your configuration does not allow connection to
公開されているcomposer.json
にはsecure-http
の記載がありません。
改めてググってみたところ、グローバル環境変数?でこのオプションをオフにするコマンドがありました。
composer config -g -- disable-tls false
http://stackoverflow.com/questions/36003429/latest-composer-version-not-pulling-laravel
上記のコマンドでホームディレクトリにある設定ファイルの内容が書き換わるようです。
~/.composer/config.json
{
"config": {
"disable-tls": false
}
他のプロジェクトですがこれで解決しました。恐らく表題の件もこれで解決できると思われます。