6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOSでrevelインストールしようとしたらgo getで固まる

Last updated at Posted at 2015-10-20

CentOS上でRevel開発してみよう!と思ったらインストールではまったのでメモ

現象

公式のとおり以下手順で実施

go, git, hgインストール(省略)
mkdir ~/gocode
echo 'export GOPATH=~/gocode' >> ~/.bash_profile
source ~/.bash_profile

go get github.com/revel/revel

返ってこない・・・

ずっとこのままの状態。git clone がうまくいってないような

[root@server ~]# ps -ewf | grep go
root     24409 24377  0 10:33 pts/0    00:00:00 go get -u github.com/revel/revel
root     24575 24409  0 10:34 pts/0    00:00:00 git clone https://gopkg.in/fsnotify.v1 /root/gocode/src/gopkg.in/fsnotify.v1
root     24576 24575  0 10:34 pts/0    00:00:00 git-remote-https https://gopkg.in/fsnotify.v1 https://gopkg.in/fsnotify.v1
root     24580 24576  0 10:34 pts/0    00:00:00 git fetch-pack --stateless-rpc --lock-pack --thin --no-progress https://gopkg.in/fsnotify.v1  efs/heads/master  efs/heads/travisci  efs/heads/v0  efs/tags/v0.8.06  efs/tags/v0.8.07  efs/tags/v0.8.08  efs/tags/v0.8.09  efs/tags/v0.8.10  efs/tags/v0.8.11  efs/tags/v0.8.12  efs/tags/v0.8.13  efs/tags/v0.9.0  efs/tags/v0.9.1  efs/tags/v0.9.2  efs/tags/v0.9.3  efs/tags/v1.0.0  efs/tags/v1.0.2  efs/tags/v1.0.3  efs/tags/v1.0.4  efs/tags/v1.1.0  efs/tags/v1.1.1  efs/tags/v1.2.0  efs/tags/v1.2.1

原因

gitのバグとのこと。
http://oranie.hatenablog.com/entry/20141104/1415103858
https://github.com/spf13/hugo/issues/297

CentOSのBaseリポジトリ(yum)だとたしかに1.7.1でした。

対応

gitバージョンアップしてみる
ソース
インストール手順

# yumで入れてたやつ消す
yum remove git

# ソースインストール
yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc
wget https://www.kernel.org/pub/software/scm/git/git-2.6.2.tar.gz
tar xzf git-2.6.2.tar.gz
cd git-2.6.2
make prefix=/usr/local all
make prefix=/usr/local install

# 確認
[root@server ~]# git version
git version 2.6.2
[root@server ~]# which git
/usr/local/bin/git

できた!!!!!


[root@server ~]# go get github.com/revel/revel
[root@server ~]# go get github.com/revel/cmd/revel
[root@server ~]# which revel
/root/gocode/bin/revel
[root@server ~]# revel
~
~ revel! http://revel.github.io
~
usage: revel command [arguments]

The commands are:

    new         create a skeleton Revel application
    run         run a Revel application
    build       build a Revel application (e.g. for deployment)
    package     package a Revel application (e.g. for deployment)
    clean       clean a Revel application's temp files
    test        run all tests from the command-line

Use "revel help [command]" for more information.
6
6
0

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
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?