Gitをソースからコンパイルしてインストールする。 #Linux - Qiita 2020
https://github.com/git/git/releases/tag/v2.43.0
$ curl -LO https://github.com/git/git/archive/refs/tags/v2.43.0.tar.gz $ tar xvzf v2.43.0.tar.gz $ cd git-2.43.0/ $ gmake configure $ ./configure --prefix=/usr/local/git-2.43.0 --without-iconv $ gmake all # gmake install $ /usr/local/git-2.43.0/bin/git --version git version 2.43.0
--without-iconv は以下エラー回避
libgit.a(utf8.o): In function `reencode_string_iconv': /home/kurita/src/git-2.43.0/utf8.c:(.text+0xef3): undefined reference to `libiconv' libgit.a(utf8.o): In function `reencode_string_len': /home/kurita/src/git-2.43.0/utf8.c:593: undefined reference to `libiconv_open' /home/kurita/src/git-2.43.0/utf8.c:598: undefined reference to `libiconv_open' /home/kurita/src/git-2.43.0/utf8.c:603: undefined reference to `libiconv_close' cc: error: linker command failed with exit code 1 (use -v to see invocation) gmake: *** [Makefile:2793: git-daemon] Error 1
libiconv をインストールしている場合に #include
/usr/include/iconv.h
/usr/local/include/iconv.h