12
12

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.

[Git][Linux] Gitの最新をソースからビルドする

Last updated at Posted at 2015-11-10

目的

Gitの最新を使いたいのでソースをビルドしてインストールする。

検証環境

Ubuntu 14.04

ビルド手順

Gitの最新ソースを取得

ソースは以下にホスティングされています。

git/git: Git Source Code Mirror

依存パッケージの取得

新しいGitではOpenSSLに依存があるため、先にインストールします。

apt
sudo apt-get install libcurl4-openssl-dev libexpat1-dev

ビルド

Git の取得時に git コマンドがあるのは期待できないため、wgetでzipを取得する手順も記載しています。

# gitがある場合
git clone https://github.com/git/git.git
cd git

# gitがない場合
wget https://github.com/git/git/archive/master.zip
unzip master.zip 
cd git-master/

# ビルド
make prefix=/usr/local all
sudo make prefix=/usr/local install
# バージョン確認
$ git --version
git version 2.12.0

インストールスクリプト例

dotfiles/build.sh at master · koara-local/dotfiles

12
12
2

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?