LoginSignup
1
2

More than 5 years have passed since last update.

gitをソースコードからインストールする

Last updated at Posted at 2016-03-30

CentOC6系だとyumからインストールできるgitのバージョンが1.7...

既に最新は2.7とかなり離れているのでいろいろ使えないオプションがあったり。。。。

ということでソースからインストール

下記からソースを取得

https://www.kernel.org/pub/software/scm/git/

wget https://www.kernel.org/pub/software/scm/git/git-2.7.4.tar.gz
cd git-2.7.4
./configure
make

エラーが出ました

/usr/bin/perl Makefile.PL PREFIX='/usr/local' INSTALL_BASE='' --localedir='/usr/local/share/locale'
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 3.
BEGIN failed--compilation aborted at Makefile.PL line 3.
make[1]: *** [perl.mak] Error 2
make: *** [perl/perl.mak] Error 2

perlモジュールが無いようなのでインストールします

yum install perl-ExtUtils-MakeMaker

再度make

/bin/sh: msgfmt: command not found
make: *** [po/build/locale/bg/LC_MESSAGES/git.mo] Error 127

またもエラー、今度はgettextというパッケージ

yum install gettext

今度は無事インストールできました

make
make install

これでOK

1
2
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
1
2