Linux Suse Enterprise 11 SP2 如何安装git

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10953925/
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 06:44:10  来源:igfitidea点击:

Suse Enterprise 11 SP2 how to install git

linuxgitsuse

提问by Brade

I've never had a problem installing git on any Linux distro, but now I'm forced to use a client's server which is SLES 11 SP2. It uses yastor zypperto do package management, which I've never used before. Apparently I should be able to zypper install git-corebut that doesn't work because it needs a certain repo added. Of course none of this is on the official git installation page here.

我在任何 Linux 发行版上安装 git 从来没有遇到过问题,但现在我不得不使用客户端服务器,它是 SLES 11 SP2。它使用yastzypper进行包管理,我以前从未使用过。显然我应该能够,zypper install git-core但这不起作用,因为它需要添加某个回购。当然,这一切都不是官方的git安装页面在这里

I found what packages belong to the SLE11-SP2-SDK repo here. But no instructions on how to add the repo to yast or zypper.

我发现属于什么包的SLE11-SP2-SDK回购这里。但是没有关于如何将 repo 添加到 yast 或 zypper 的说明。

I'll also accept an answer that simply tells me how to install git on a SLES server. I've already tried from source, but of course it's missing requirements which also belong to the SDK repo.

我也会接受一个简单地告诉我如何在 SLES 服务器上安装 git 的答案。我已经从源代码中尝试过,但当然它缺少也属于 SDK 存储库的要求。

This is what I get when I do "zypper install git-core":

这就是我执行“zypper install git-core”时得到的结果:

$ sudo zypper install git-core

Refreshing service 'nu_novell_com'.
Loading repository data...
Reading installed packages...
'git-core' not found in package names. Trying capabilities.
No provider of 'git-core' found.
Resolving package dependencies...

Nothing to do.

回答by Brade

I figured it out, only by piecing together other info mainly from the OpenSUSE project. Basically it's:

我想通了,只是将主要来自 OpenSUSE 项目的其他信息拼凑在一起。基本上是:

$ sudo zypper addrepo http://download.opensuse.org/repositories/devel:/tools:/scm/SLE_11_SP2/devel:tools:scm.repo
$ sudo zypper install git-core

回答by user1571656

git is part of the SDK for SLES, which can be downloaded here:

git 是 SLES SDK 的一部分,可以在这里下载:

http://download.novell.com(ideally for the currently used SP2)

http://download.novell.com(当前使用的 SP2 的理想选择)

Once you installed itm the zypper or yast commands work. It's not recommended to use openSUSE rpms within a SLES environment.

一旦你安装了它,zypper 或 yast 命令就可以工作了。不建议在 SLES 环境中使用 openSUSE rpms。

回答by Hymany

I meet a silly problem during zypper refresh, later figured out that /tmp directory should be created ahead. After that, everything work out.

我在 zypper 刷新期间遇到了一个愚蠢的问题,后来发现应该提前创建 /tmp 目录。在那之后,一切都会好起来的。

13392046a881:/ # zypper -v refresh
Verbosity: 1
Initializing Target
Specified repositories: 
Checking whether to refresh metadata for Software configuration management (SLE_11_SP3)
Retrieving: repomd.xml [done]
Repository 'Software configuration management (SLE_11_SP3)' is up to date.
Building repository 'Software configuration management (SLE_11_SP3)' cache [done]
Error building the cache:
[|] Failed to cache repo (3).
History:
- 'repo2solv.sh' '-o' '/var/cache/zypp/solv/devel_tools_scm/solv' '/var/cache/zypp/raw/devel_tools_scm'
mktemp: failed to create file via template `/tmp/tmp.XXXXXXXXXX': No such file or directory

回答by Marmoy

You need to download the SLES 11 SP2 SDKDVD's from download.suse.com. In order to access the downloads, you need to register a user account (it's free).

您需要下载SLES 11 SP2 SDK从DVD的download.suse.com。为了访问下载,您需要注册一个用户帐户(它是免费的)。

  1. Once downloaded, mount the first DVD. (make sure it is for the correct architecture)

  2. Load up YaST and go to Software->Add-on products.

  3. Then select 'Add' and continue the installation by selecting the installation source, accepting the license, etc.

  4. Repeat for DVD2, unless DVD1 had everything you needed.

  1. 下载后,安装第一张 DVD。(确保它适用于正确的架构)

  2. 加载 YaST 并转到软件->附加产品。

  3. 然后选择“添加”并通过选择安装源、接受许可证等继续安装。

  4. 重复 DVD2,除非 DVD1 有你需要的一切。

回答by rashok

In zypperneed to add the repository of gitusing zypper addrepo <repo_url>command, before trying to install it. You can get the repo URL of gitpackage here.

在尝试安装之前,zypper需要添加gitusingzypper addrepo <repo_url>命令的存储库。您可以在此处获取git包的 repo URL 。

回答by Ziaa

Offline Install git on SLES 12 SP2 using SDK ISO

使用 SDK ISO 在 SLES 12 SP2 上离线安装 git

If you do not have direct access to the remote/online SLES zypper repositories, you can add SDKISO as a repository. Some packages are available in this ISO.

如果您无法直接访问远程/在线 SLES zypper 存储库,则可以将SDKISO添加为存储库。此 ISO 中提供了一些软件包。

1) Download SLE-12-SP2-SDK-DVD-x86_64-GM-DVD1.isofrom https://download.suse.com/Download?buildid=g3e7P21X6Lw~(It requires sign-up). You can also find your desired ISO SDK at https://download.suse.com

1)从https://download.suse.com/Download?buildid=g3e7P21X6Lw~下载SLE-12-SP2-SDK-DVD-x86_64-GM-DVD1.iso(需要注册)。您还可以在https://download.suse.com 上找到所需的 ISO SDK

2) Copy & transfer downloaded the file to the SLES machine. (here we transfer it to /temp/SLE-12-SP2-SDK-DVD-x86_64-GM-DVD1.iso)

2) 将下载的文件复制并传输到 SLES 机器。(这里我们转移到/temp/SLE-12-SP2-SDK-DVD-x86_64-GM-DVD1.iso)

3) Add ISO as Zypper repository

3) 添加 ISO 作为 Zypper 存储库

zypper ar iso:/?iso=/temp/SLE-12-SP2-SDK-DVD-x86_64-GM-DVD1.iso sdk_dvd

4) install git

4)安装git

zypper install git-core