homebrewがインストールできなかった

 

プロキシの問題だった。。。

 

mac環境:

$ sw_vers

ProductName: Mac OS X

ProductVersion: 10.12.5

BuildVersion: 16F73

 

問題:

homebrew公式サイト:Homebrew — macOS 用パッケージマネージャーから

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

をコピペすると、以下のエラー。

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out

 

解決法:

[linux] proxyのせいでcurlが「curl: (7) couldn’t connect to host」でつながらない時の解決方法 | 迷走男子!!

を参考に、

/usr/bin/ruby -e "$(curl -x http://myproxy.jp:8080/ -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

とすると (myproxy部分に大学のプロキシ)、インストール成功した。

 

以下、(関係なかったが) 解決にたどり着くまでに参考にした記事と設定した事。

Gitではじめるバージョン管理 〜Gitをインストール for Mac OS X〜

   ・gitの初期設定.

Git設定 | 逆引きGit | サルでもわかるGit入門 〜バージョン管理を使いこなそう〜 | どこでもプロジェクト管理バックログ

$ git config --global http.proxy <プロキシサーバのアドレス>:<プロキシサーバのポート番号>

 

Failed connect to github.com:443の解決方法

  ・vim ~/.netrc 

    machine github.com
    login ログインID(メールアドレス)

   を記述した。

  ・次のコマンドを打った。

    git config --global http.sslVerify falsegit config --global http.sslVerify false

 

 

p.s.

・一時的ではなく常時このプロキシの為、curlのプロキシ設定を書いた。

        $vi ~/.curlrc

          proxy=http://myproxy:8080

  

・初記事です。ぐちゃぐちゃですね。