2010年10月17日日曜日

Ubuntu 10.04 LTS にGITをインストールした



先日買った、「GIT入門」に従って、ubuntuにインストールしてみた。


まずは、git-coreソースパッケージというのをインストール。



$ sudo apt-get build-dep git-core


次はGITの最新ソースをGITのwebサイトからダウンロードする。


ダウンロード後は任意の場所に展開してから、以下のように実行する。(ここではtempの下に展開しました)



$ cd temp
/temp$ cd git-1.7.3.1
/temp/git-1.7.3.1$ sudo make prefix=/usr/local all doc


と、ここでエラー発生。



CC fast-import.o
In file included from builtin.h:4,
from fast-import.c:147:
git-compat-util.h:140:25: error: openssl/ssl.h: No such file or directory
git-compat-util.h:141:25: error: openssl/err.h: No such file or directory
In file included from builtin.h:6,
from fast-import.c:147:
cache.h:9:21: error: openssl/sha.h: No such file or directory
In file included from fast-import.c:156:


opensslが入ってない?


軽くハマりましたが、以下のようにしてなんとか解決。



$ sudo apt-get install openssl
$ sudo apt-get install libssl-dev


※私の環境では、opensslは入ってたけど、libssl-devが無かったようです。


そして再度実行。



/temp/git-1.7.3.1$ sudo make prefix=/usr/local all doc


ボリュームがあるのか、20分くらいかかりました(^^;


続いて、やっとGITのインストールへ。



/temp/git-1.7.3.1$ sudo make install install-doc


最後にインストールの確認。



/temp/git-1.7.3.1$ git --version
プログラム 'git' はまだインストールされていません。 次のように入力することでインストールできます:
sudo apt-get install git-core


えー、最初にやったのインストールじゃなかったの???


なんか調べる気力が無いので、言われた通り、コマンドを打ってみた。



sudo apt-get install git-core


終わったのでもう一度確認。



/temp/git-1.7.3.1$ git --version
git version 1.7.0.4


あ、やっと入った。


ちょっと怪しいが・・・ま、よしとするかw


linuxって、すんなりインストール出来たことが少ない気がする。


初心者だからですかね(^^;





0 件のコメント:

コメントを投稿