Linux 控制台:在 x64 Cent OS 上找不到 git 命令

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8402259/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 03:31:37  来源:igfitidea点击:

Linux console: git command not found on x64 Cent OS

linuxgitgithub

提问by John

I have a completely fresh install of 64 Bit Cent OS 5.7, this is in VirtualBox on top of 64-bit XP.

我有一个全新安装的 64 位 Cent OS 5.7,它位于 64 位 XP 之上的 VirtualBox 中。

I'm trying to install SSU.

我正在尝试安装 SSU。

Problem: The command 'git' was not found. See "code" below please.

问题:找不到命令“git”。请参阅下面的“代码”。

Have tried looking this up: /usr/local/git/does not exist: git: command not found (on OS X 10.5)

已尝试查找:/usr/local/git/不存在:git:未找到命令(在 OS X 10.5 上)

I don't care about source code: I just want git to work so SSU will install so I can try to access the bank on what seems like a huge whim.

我不关心源代码:我只是想让 git 工作,这样 SSU 就会安装,这样我就可以尝试访问银行,这似乎是一个巨大的心血来潮。

I am signed in to Gnome as root and seem to be able to access my computer normally without being harassed about passwords excessively and can create or edit files.

我以 root 身份登录 Gnome,似乎能够正常访问我的计算机,而不会受到过多的密码骚扰,并且可以创建或编辑文件。

[root@localhost ~]# $ git clone https://github.com/wesabe/ssu
bash: $: command not found

Concerns

顾虑

Unfortunately every single time I ask these kinds of questions and don't make clarifications I end up having to make those clarifications. So...

不幸的是,每次我问这些类型的问题而没有做出澄清时,我最终不得不做出这些澄清。所以...

No negativity or rudeness intended what-so-ever: if the answer involves editing a text file or copy-and-paste actions please tell me the locations to do so in the file manager instead of console commands. I'm perfectly okay copying and pasting console commands for things that really should be done in the console though.

没有任何消极或粗鲁的意图:如果答案涉及编辑文本文件或复制和粘贴操作,请告诉我在文件管理器中执行此操作的位置而不是控制台命令。对于真正应该在控制台中完成的事情,我完全可以复制和粘贴控制台命令。

Note: there appear to be numerous "git" commands and numerous "ssu" commands. I do NOT know the difference between them and would really prefer someone who has solid expertise to answer so that I nor others end up accidentally trashing our copies of Linux as it's been very difficult to get anything to work and stay working thus extending my personal stay with XP.

注意:似乎有许多“git”命令和许多“ssu”命令。我不知道它们之间的区别,我真的更喜欢有扎实专业知识的人来回答,这样我和其他人最终都会不小心破坏我们的 Linux 副本,因为很难让任何东西正常工作并继续工作,从而延长我的个人停留时间与 XP。

I will be more than happy to both accept an answer and thumbs it up should it be helpful.

如果有帮助,我将非常乐意接受答案并竖起大拇指。

回答by larsks

I would first try installing git. As root:

我会先尝试安装git. 作为根:

yum install git

回答by Brigand

According to here,

根据这里

yum install git-core

If that doesn't work you could add the EPELsource. There are also RPMs for git.

如果这不起作用,您可以添加EPEL源。 git 也有 RPM