安装 Git 版本控制工具

本文详细介绍了如何从源代码进行Git的编译安装,并针对Windows环境提供了相关工具,包括Cygwin、msysGit和TortoiseGit等。还解决了在安装过程中可能出现的一些常见错误,如msgfmt命令未找到、动态库加载失败等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

从源代码进行编译安装

1. 先下载最新的 git 稳定版源码

wget https://git-core.googlecode.com/files/git-1.7.10.tar.gz

2. 解压源码,并进入源码目录

a. msgfmt: command not found

解决方法:yum install gettext

b. 安装完毕执行git,提示“git: error while loading shared libraries: libcharset.so.1: cannot open shared object file: No such file or directory”

解决方法:ln -s /usr/local/lib/libcharset.so.1 /lib/libcharset.so.1

c.: undefined reference to `dlopen' etc Makefile链接选项中增加 -ldl即可


附:Windows 环境使用 Git 的相关工具

1. Cygwin http://www.cygwin.com/附:Windows 环境使用 Git 的相关工具

2. msysGit http://msysgit.github.com/

3. TortoiseGit http://code.google.com/p/tortoisegit/


转改自:http://www.fising.cn/2012/04/%E5%AE%89%E8%A3%85-git-%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6%E5%B7%A5%E5%85%B7.shtml

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值