LoginSignup
0

More than 5 years have passed since last update.

CentOS6.xでglide installの処理が終わらないときはgitのバージョンを疑え

Posted at

環境

CentOS (6.9)
go (1.9.2)
glide (0.13.1)

現象

glide installを実行後、コンソールにメッセージが表示されたまま処理が止まってしまう。

go get gopkg.in/go-playground/validator.v9を実施しても同じように応答がなくなる。

$ glide install
[WARN]  The name listed in the config file (grow) does not match the current location (.)
[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Found desired version locally github.com/aws/aws-sdk-go 25ef42b41b82230caae56ab23d872c81fb5c0eae!
[INFO]  --> Found desired version locally github.com/dgrijalva/jwt-go a539ee1a749a2b895533f979515ac7e6e0f5b650!
[INFO]  --> Found desired version locally github.com/fatih/structs f5faa72e73092639913f5833b75e1ac1d6bc7a63!
[INFO]  --> Found desired version locally golang.org/x/net a337091b0525af65de94df2eb7e98bd9962dcbe2!
[INFO]  --> Found desired version locally golang.org/x/oauth2 9ff8ebcc8e241d46f52ecc5bff0e5a2f2dbef402!
[INFO]  --> Found desired version locally golang.org/x/sys 314a259e304ff91bd6985da2a7149bbf91237993!
[INFO]  --> Found desired version locally google.golang.org/api b804618854e387dc7fdd9e50496183ddcbb4b120!
[INFO]  --> Found desired version locally google.golang.org/appengine 9d8544a6b2c7df9cff240fcf92d7b2f59bc13416!
[INFO]  --> Found desired version locally gopkg.in/yaml.v2 eb3733d160e74a9c7e442f435eb3bea458e1d19f!
[INFO]  --> Fetching gopkg.in/go-playground/validator.v9  #ここで処理が止まる



原因と対処

gitのバージョンが古い。yumの標準のレポジトリではgitをインストールすると1.7系のgitがインストールされていた。

$ git --version
git version 1.7.1

2系のgitをインストールする。

$ sudo yum remove git # 古いバージョンのgitを削除
$ sudo curl -s https://setup.ius.io/ | bash
$ sudo yum install git2u
$ git --version 
git version 2.15.1

参考: CentOSにてGit v2系をパッケージでインストール

gitのバージョンアップ後に、glide installを実行すると処理が完了するようになります。

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