如何在CENTOS 5.5机器上安装git?我试图从yum安装它,但得到了msg。
root@host [~]# sudo yum install git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.mirrors.tds.net
* base: mirror.ubiquityservers.com
* extras: mirrors.serveraxis.net
* updates: pubmirrors.reflected.net
addons | 951 B 00:00
base | 2.1 kB 00:00
extras | 2.1 kB 00:00
updates | 1.9 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package git available.
Nothing to do
root@host [~]#
发布于 2010-09-23 22:33:03
从源头?从回购中?最简单的方法是使用repos:sudo yum install git
应该这样做。如果主repos没有提供EPEL,那么首先可能需要设置一个额外的repo,比如git first。
如果你想从源代码安装,你可以尝试these指令。如果你已经安装了yum-utils
,它实际上也比这更容易**
sudo yum build-dep git
wget http://kernel.org/pub/software/scm/git/<latest-git-source>.tar.gz
tar -xvjf <latest-git>.tar.gz
cd <git>
make (possibly a ./configure before this)
sudo make install
**将<>
中包含的部分替换为您需要的路径。确切的过程可能会略有不同,因为我没有亲自从源代码编译git (例如,可能有一个配置脚本)。如果你不知道我在说什么,那么你可能只想按照我的第一个建议从repo安装。
发布于 2011-11-30 22:28:50
如果您使用的是CentOS,那么内置的yum
存储库似乎没有包含git
,因此,您需要向系统中添加一个额外的存储库。对于我的服务器,我发现Webtatic存储库似乎是相当最新的,git
的安装将如下所示:
# Add the repository
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
# Install the latest version of git
yum install --enablerepo=webtatic git-all
要解决Missing Dependency: perl(Git)
错误,请执行以下操作:
yum install --enablerepo=webtatic --disableexcludes=main git-all
发布于 2012-02-03 02:08:38
只要:
sudo rpm -Uvh https://archives.fedoraproject.org/pub/archive/epel/5/i386/epel-release-5-4.noarch.rpm
sudo yum install git-core
https://stackoverflow.com/questions/3779274
复制相似问题