LoginSignup
5
5

More than 5 years have passed since last update.

raspberry piでgit最新版を使う

Last updated at Posted at 2015-01-31

追記:完全上位互換の記事があった。そちら参照。
RaspberryPi - Raspberry Piに最新版の各種ツール・言語・ライブラリをインストールする - Qiita
あちらのようにlibcurlの位置を指定するなら、Debian -- File list of package libcurl4-openssl-dev/wheezy/armelあたりを参考に。

いつものようにdotfilesをダウンロードしたらこんなエラーを吐いた。

error: Malformed value for push.default: simple
error: Must be one of nothing, matching, tracking or current.
fatal: bad config file line 8 in /home/user/.gitconfig

gitが1.8より古いと出るとのこと。
試しにgit --versionするとgit version 1.7.10.4とのこと。aptにある2015年1月現在最新がこれ。

仕方ないので野良ビルド。依存関係にあるものは以下

$ sudo aptitude install autoconf automake ncurses-dev gettext libghc-zlib-dev libcurl4-openssl-dev

Index of /pub/software/scm/gitからgit-2.2.2.tar.gzを落としてきて

$ gzip -dc git-2.2.2.tar.gz | tar xvf -
$ cd git-2.2.2
$ ./configure --prefix=/usr/local --with-curl --with-expat
$ make
$ sudo make install

これで快適gitライフ。

$ git --version
git version 2.2.2
5
5
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
5
5