LoginSignup
1
3

More than 5 years have passed since last update.

Gitのlocalのバージョンを更新

Posted at

Gitのlocalのバージョンを更新

iOS開発でCarthageをインストールしようとしたら以下のようなエラーが出た。
carthagerequiresgit230orlater.png

そういえば3年前から全くgitのバージョンを更新していなかった気がしたと思い、これを気にgitのバージョンを更新してみることに!

git_version.png
現在のバージョンは2.1.0でした。

今回はこちらのサイトを参照に更新しました。
http://www.task-notes.com/entry/20150622/1434942000

which_git.png
自分の場合 /usr/local/src/ ではなく、 /user/local/bin/ の中にgitが入っているようだったので、

% cd /user/local/bin
% git clone git://git.kernel.org/pub/scm/git/git.git
% cd git

make_prefix.png

続いて make prefix=/usr/local all を実行すると上のようなエラーが出た。
調べたところ、
https://sites.google.com/site/aotokage52/git-wososukarainsutoru
こちらのサイトを参照すると上手くいった。

% brew install autoconf
% rehash
% make configure
% ./configure --prefix=$PWD/INSTALL_DIR 
% make >& make.log &; tail -f make.log
% make install

これを実行したことによって先ほどのエラーもなくなりました。

% make prefix=/usr/local all
% make prefix=/usr/local install

git_version_211.png

これで無事にgitのバージョンを 2.11.0 にアップデートできました。
どうやらgitはgitで管理する方が良さそうですね!!

おまけに、Carthageの導入にも成功しました。
% carthage update --platform ios

1
3
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
1
3