git のインストール
OS:CentOS:5.5
git:1.7.1
yumを使ってインスールしようとしたが、デフォルトのyumの設定では
インストールできないようで、いろいろ調べて試したがうまく
いかなかったので、ソースからインストールすることにした。
・ git-1.7.1.tar.gz を取得
・ 上記を展開
・ 展開されたディレクト内にてMake実行
make prefix=/usr/local/git-1.7.1
※ /usr/local/git-1.7.1にインストール
ところが、以下のようなエラーがでた。
/bin/sh: curl-config: command not found
GIT_VERSION = 1.7.1
/bin/sh: curl-config: command not found
* new build flags or prefix
CC fast-import.o
builtin.h:4 から include されたファイル中,
fast-import.c:147 から:
git-compat-util.h:140:25: error: openssl/ssl.h: そのようなファイルやディレクトリはありません
git-compat-util.h:141:25: error: openssl/err.h: そのようなファイルやディレクトリはありません
(中略)
t-import.c:1220: error: too many arguments to function ‘truncate_pack’
fast-import.c:1227: error: too many arguments to function ‘truncate_pack’
fast-import.c: In function ‘git_pack_config’:
fast-import.c:2846: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function)
make: *** [fast-import.o] エラー 1
どうも、 configからやらないといけないようだ。最近この手の
インストールはやっていなかったので、手を抜き過ぎのようだ。
・ configを実行
./configure --prefix=/usr/local/git-1.7.1
・ makeを実行
make
再びエラー発生
* new build flags or prefix
CC fast-import.o
builtin.h:6 から include されたファイル中,
fast-import.c:147 から:
cache.h:17:18: error: zlib.h: そのようなファイルやディレクトリはありません
In file included from builtin.h:6,
from fast-import.c:147:
cache.h:22: error: expected ‘)’ before ‘strm’
(中略)
fast-import.c:1188: error: ‘Z_FINISH’ undeclared (first use in this function)
fast-import.c:1200: error: ‘Z_BUF_ERROR’ undeclared (first use in this function)
fast-import.c: In function ‘git_pack_config’:
fast-import.c:2846: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function)
make: *** [fast-import.o] エラー 1
以下のメッセージがでているので、
「error: zlib.h: そのようなファイルやディレクトリはありません」
これは zlib-developer がないということようです。
・ zlib-developer の インストール
yum -y install zlib-devel
・ makeする
make
・ インストールする
make install
・ git に PATH を通しておく
「.bashr_profile」 に 下記のパスを追加
/usr/local/git-1.7.1/libexec/git-core
OS:CentOS:5.5
git:1.7.1
yumを使ってインスールしようとしたが、デフォルトのyumの設定では
インストールできないようで、いろいろ調べて試したがうまく
いかなかったので、ソースからインストールすることにした。
・ git-1.7.1.tar.gz を取得
・ 上記を展開
・ 展開されたディレクト内にてMake実行
make prefix=/usr/local/git-1.7.1
※ /usr/local/git-1.7.1にインストール
ところが、以下のようなエラーがでた。
/bin/sh: curl-config: command not found
GIT_VERSION = 1.7.1
/bin/sh: curl-config: command not found
* new build flags or prefix
CC fast-import.o
builtin.h:4 から include されたファイル中,
fast-import.c:147 から:
git-compat-util.h:140:25: error: openssl/ssl.h: そのようなファイルやディレクトリはありません
git-compat-util.h:141:25: error: openssl/err.h: そのようなファイルやディレクトリはありません
(中略)
t-import.c:1220: error: too many arguments to function ‘truncate_pack’
fast-import.c:1227: error: too many arguments to function ‘truncate_pack’
fast-import.c: In function ‘git_pack_config’:
fast-import.c:2846: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function)
make: *** [fast-import.o] エラー 1
どうも、 configからやらないといけないようだ。最近この手の
インストールはやっていなかったので、手を抜き過ぎのようだ。
・ configを実行
./configure --prefix=/usr/local/git-1.7.1
・ makeを実行
make
再びエラー発生
* new build flags or prefix
CC fast-import.o
builtin.h:6 から include されたファイル中,
fast-import.c:147 から:
cache.h:17:18: error: zlib.h: そのようなファイルやディレクトリはありません
In file included from builtin.h:6,
from fast-import.c:147:
cache.h:22: error: expected ‘)’ before ‘strm’
(中略)
fast-import.c:1188: error: ‘Z_FINISH’ undeclared (first use in this function)
fast-import.c:1200: error: ‘Z_BUF_ERROR’ undeclared (first use in this function)
fast-import.c: In function ‘git_pack_config’:
fast-import.c:2846: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function)
make: *** [fast-import.o] エラー 1
以下のメッセージがでているので、
「error: zlib.h: そのようなファイルやディレクトリはありません」
これは zlib-developer がないということようです。
・ zlib-developer の インストール
yum -y install zlib-devel
・ makeする
make
・ インストールする
make install
・ git に PATH を通しておく
「.bashr_profile」 に 下記のパスを追加
/usr/local/git-1.7.1/libexec/git-core