CentOS5.7 编译安装 Git 配置Git仓库

ln -s /usr/local/bin/git* .
ln -s /usr/sbin/svn* .

[root@localhost repository]# git clone root@
Initialized empty Git repository in /root/repository/blog/.git/
bash: git-upload-pack: command not found #竟然报这么个错误,这是怎么回事呢?
fatal: The remote end hung up unexpectedly

通过google得知,git-upload-pack这个命令的path为:/usr/local/git/bin/ ,他不在non-login shell 路径下(/usr/bin),下面是解决办法:

# Fix it with symlinks in /usr/bin
[root@li96-10 ~]# cd /usr/bin/
[root@li96-10 bin]# ln -s /usr/local/git/bin/git* .


问题:git: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory


find the file,then copy the path to /etc/ld.so.conf   and save it

then $/sbin/ldconfig

ok   that’s it

安装git之后出现 某些库无法加载的情况,找到该库文件所在位置,将其路径添加至 /etc/ld.so.conf  文件中

保存后运行 /sbin/ldconfig即可