Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

豚吐露@wiki

install

最終更新:

ohden

- view
管理者のみ編集可

Git

Ubuntu 8.10
zlib 1.2.5

とりあえずapt-getしてみた
> sudo apt-get install git
見つかりませんでした。(ノ∀`)

【追記】2011/02/17
$ sudo apt-get install git-core
で取れるようになったらしい。

ぐぐる先生に聞くと
http://www.kernel.org/pub/software/scm/git/
にあるよとおっしゃられるので、
ココにあった中から最新っぽぃのを取ってきてみる。
> wget http://www.kernel.org/pub/software/scm/git/git-1.7.3.1.tar.gz
取得したfileの解凍。
> tar zxvf git-1.7.3.1.tar.gz
定番のconfigure。
> cd git-1.7.3.1/
> ./configure
オプションは良くわかんないので設定しない。
必要になったらそん時考える。w
configure走らせると
-rw-r--r--  1 s1n s1n  29787 2010-10-22 10:45 config.log
-rw-r--r--  1 s1n s1n   1308 2010-10-22 10:45 config.mak.autogen
-rwxr-xr-x  1 s1n s1n  24391 2010-10-22 10:45 config.status*
この3fileが生成されるみたい。
多分makeするとこいつらが参照されたりするんでしょう。
で、make。
> make

GIT_VERSION = 1.7.3.1
    * new build flags or prefix
    CC fast-import.o
In file included from builtin.h:6,
                 from fast-import.c:147:
cache.h:17:18: error: zlib.h: No such file or directory
In file included from builtin.h:6,
                 from fast-import.c:147:
cache.h:22: error: expected ‘)’ before ‘strm’
cache.h:23: error: expected ‘)’ before ‘strm’
cache.h:24: error: expected ‘)’ before ‘strm’
fast-import.c:285: error: ‘Z_DEFAULT_COMPRESSION’ undeclared here (not in a function)
fast-import.c: In function ‘store_object’:
fast-import.c:996: error: ‘z_stream’ undeclared (first use in this function)
fast-import.c:996: error: (Each undeclared identifier is reported only once
fast-import.c:996: error: for each function it appears in.)
fast-import.c:996: error: expected ‘;’ before ‘s’
fast-import.c:1028: error: ‘s’ undeclared (first use in this function)
fast-import.c:1039: error: ‘Z_FINISH’ undeclared (first use in this function)
fast-import.c:1039: error: ‘Z_OK’ undeclared (first use in this function)
fast-import.c: In function ‘stream_blob’:
fast-import.c:1142: error: ‘z_stream’ undeclared (first use in this function)
fast-import.c:1142: error: expected ‘;’ before ‘s’
fast-import.c:1143: error: ‘Z_OK’ undeclared (first use in this function)
fast-import.c:1165: error: ‘s’ undeclared (first use in this function)
fast-import.c:1175: error: ‘Z_STREAM_END’ undeclared (first use in this function)
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:2862: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function)
make: *** [fast-import.o] エラー 1
落ちた。(゜Д゜)

落ちた原因はzlib.hが無いよ。と・・・zlib要るんかい。

http://www.zlib.net/参照して、zlib取って来て、共有モードでInstall。
wget http://zlib.net/zlib-1.2.5.tar.gz
tar zvxf zlib-1.2.5.tar.gz
cd zlib-1.2.5/
./configure --shared
make
make test
sudo make install
configureん時に『--shared』付けないと共通で参照できるヘッダやライブラリが入らないんだと思い込んでる。
違ったら教えて下さい。(ノ∀`)

あ、そうそうよく見たら『INSTALL』ん中にzlib無いとbuildできないよってちゃんと書いてあった。(ノД`)

で、再度gitのmake。
で、正常にbuildできました。
で、make install。
> sudo make install
無事installできました。(*^ω^)

確認のversion表示。
> git --version
git version 1.7.3.1



更新日: 2022年10月07日 (金) 09時50分45秒

名前:
コメント:

すべてのコメントを見る
記事メニュー
ウィキ募集バナー