在Leopard中安装 编译 git

本文详细介绍了在MacOS Leopard系统中通过不同方式安装Git的方法,包括使用Installer、MacPorts及手动编译安装等步骤,并提供了相关依赖组件的安装过程。

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

在Leopard中


via the Installer 安装git


Download and install: git-osx-installer

via MacPorts 安装git

Install MacPorts if you haven’t already done so.
Make sure your ports are up to date.

$ sudo port selfupdate

MacPorts base version 1.600 installed

Downloaded MacPorts base version 1.600

The MacPorts installation is not outdated and so was not updated
selfupdate done!

Install Git

$ sudo port install git-core
--->  Installing curl 7.18.2_0
--->  Activating curl 7.18.2_0
--->  Installing openssh 5.0p1_0+darwin_9
--->  Activating openssh 5.0p1_0+darwin_9
--->  Installing p5-error 0.17012_0
--->  Activating p5-error 0.17012_0
--->  Installing popt 1.13_0
--->  Activating popt 1.13_0
--->  Installing rsync 3.0.2_0
--->  Activating rsync 3.0.2_0
--->  Installing git-core 1.5.5.3_0+doc
--->  Activating git-core 1.5.5.3_0+doc

You may want to include Subversion support if you want to import SVN repositories.

sudo port install git-core +svn

 

via compiling manually 安装git

 

curl -O http://surfnet.dl.sourceforge.net/sourceforge/expat/expat-2.0.1.tar.gz

tar zxvf expat-2.0.1.tar.gz

cd expat-2.0.1

./configure –prefix=/usr/local

make

make check

sudo make install

cd ..
 
curl -O http://kernel.org/pub/software/scm/git/git-1.5.3.4.tar.bz2

tar jxvf git-1.5.3.4.tar.bz2

cd git-1.5.3.4

make prefix=/usr/local all

make prefix=/usr/local test && echo $?

sudo make prefix=/usr/local install

cd ..
 
curl -O http://www.kernel.org/pub/software/scm/git/git-manpages-1.5.3.4.tar.bz2

sudo tar xjv -C /usr/local/man -f git-manpages-1.5.3.4.tar.bz2
 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值