2016-10-24 5 views
0
When I run the following command 

sudo composer update"https://packagist.org/packages.json" ファイルをダウンロードできませんでした:SSL操作は、私は解決策を持って

then I am getting following error. 

The " https://packagist.org/packages.json " file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Failed to enable crypto
failed to open stream: operation failed

答えて

-1

に失敗しました。 'sudo' をせずに次のコマンドを実行します。

composer update

You can also check the link. Why should we not use sudo : 

[ https://getcomposer.org/doc/faqs/how-to-install-untrusted-packages-safely.md][1]

+0

ます。また、このリンクをチェックすることができ作曲を更新しながら、なぜsudoを使用しないでください:。。。https://getcomposer.org/doc/faqs/how-to-install-untrusted-packages -safely.md –

0

Certain Composer commands, including exec, install, and update allow third party code to execute on your system. This is from its "plugins" and "scripts" features. Plugins and scripts have full access to the user account which runs Composer. For this reason, it is strongly advised to avoid running Composer as super-user/root.

You can disable plugins and scripts during package installation or updates with the following syntax so only Composer's code, and no third party code, will execute:

composer install --no-plugins --no-scripts 
composer update --no-plugins --no-scripts 

EXECコマンドは常に作曲を実行するユーザーとしてサードパーティのコードを実行します。

In some cases, like in CI systems or such where you want to install untrusted dependencies, the safest way to do it is to run the above command.

so always run composer without sudo 
1

私はPHP 7.0.12にアップグレードする自作を使用した後にOSX上で、この問題に出くわしました。

問題を解決するために、私はcacert.pemをWGETを使用してダウンロードしました。

wget http://curl.haxx.se/ca/cacert.pem

私は私のホームディレクトリ/Users/alex/cacert.pemにそのファイルを保存しました。その後、そのcacertの場所を指すようにPHP.iniファイルを設定しました。

これを行うには。まず、あなたのphp.iniを検索し、生成しなければならないコマンドphp --iniを実行します。

$ php --ini 
Configuration File (php.ini) Path: /usr/local/etc/php/7.0 
Loaded Configuration File:   /usr/local/etc/php/7.0/php.ini 
Scan for additional .ini files in: /usr/local/etc/php/7.0/conf.d 

編集するINIファイルをロードした設定ファイルの場所に1つです。そのファイルをあなたのエディタ(Vimなど)で開き、openssl.cafileの設定を見つけてください。これはおそらくコメントアウトされているのでコメントを外してcacert.pemの場所を挿入してください。

それからなど

0

compose installcomposer updatecomposer self-updateを実行することができるはず私はこれらのソリューションを試してみたが、それらのどれも私のために働いていません。ダミーの回避策のように聞こえるかもしれませんが、誰でもそれが役に立つと思った場合にはどうしたのでしょうか。

1)一時的にモバイルをWi-Fiホットスポットとして有効にしました。 2)ノートパソコンをこのWi-Fiに接続しました。私はララヴェル/作曲家が走っている私のバゲントVMをここに持っています。 3)VM内のすべてのプロキシ環境設定(http_proxy、https_proxyなど)を無効にしました。 4)次に、 "composer global requires" laravel/installer "と" composer create-project laravel/laravel "コマンドを使用してプロジェクトを正常に作成しました 5)wifiホットスポットを切断して正常に動作し始めました(イーサネット) 。

HTH カルロス

関連する問題