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

总结:不加路径可直接使用命令添加操作
ln -s /usr/local/bin/git* .
ln -s /usr/sbin/svn* .
加【.】表示排除文件夹目录

[root@localhost repository]# git clone root@74.207.254.10:/usr/local/system/repository/blog
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

http://vsfor.com/archives/114

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即可