LoginSignup
0
0

More than 5 years have passed since last update.

Mac の Composer で SSL エラーでうまく動かなくなった時の対処法 (OS アップグレード後)

Last updated at Posted at 2018-03-13

Mac OS X Sierra から High Sierra にアップグレードした後に Composer (PHP パッケージ) の調子がおかしく composer install しても

Downloading (failed)       
Downloading (failed)    Failed to download xxxx/xxxx from dist: The "https://api.github.com/repos/xxxx/xxxx" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
ror messages:
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Failed to enable crypto
failed to open stream: operation failed

と OpenSSL のエラーでちゃんとレポジトリからダウンロードできなかったというエラーが起こって四苦八苦していましたが、Mac OS のアップグレードをした後に、X Code のコマンドラインツールの設定がおかしくなっていたのが原因でした。

OpenSSL のパス確認方法

xcode-select -p
/Applications/Xcode.app/Contents/Developer

と表示されるとおかしいので、修正する。

sudo xcode-select -switch /Library/Developer/CommandLineTools

再度

xcode-select -p

で、/Library/Developer/CommandLineTools であると修正完了。

参考
MacのhomebrewでOpenSSLがビルドエラーになる場合の対処方法
https://techracho.bpsinc.jp/hachi8833/2016_09_09/25454

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0