Git 大文件存储/如何在 AWS EC2 Linux 2 上安装 git lfs /“没有可用的 git-lfs 包。”

发布于 2025-01-13 18:00:54 字数 1003 浏览 1 评论 0原文

如何在 Amazon EC2 (Amazon Linux 2) 实例上安装 git-lfs

基于 https://github.com/git-lfs/git -lfs/blob/main/INSTALLING.md 我尝试过吗:

sudo yum install git -y;
cd /home/ec2-user;
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
   -> which tells me afterwards: 
   The repository is setup! You can now install packages.
sudo yum install git-lfs
   -> gives me: 
   Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
   No package git-lfs available.
   Error: Nothing to do

未来的命令(尚不可能 duo git:'lfs' 不是 git 命令。请参阅'git --help'。 之后git lfs install)将基于https://git-lfs.github。 com/

git lfs install
...
git clone https://yourrepo.git;

Amazon Linux 2 AMI (HVM) - 内核 5.10,SSD 卷类型/Arm

How to install git-lfs on an Amazon EC2 (Amazon Linux 2) instance?

Based on https://github.com/git-lfs/git-lfs/blob/main/INSTALLING.md did I tried:

sudo yum install git -y;
cd /home/ec2-user;
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
   -> which tells me afterwards: 
   The repository is setup! You can now install packages.
sudo yum install git-lfs
   -> gives me: 
   Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
   No package git-lfs available.
   Error: Nothing to do

Future commands (not possible yet duo git: 'lfs' is not a git command. See 'git --help'. after git lfs install) would than be based on https://git-lfs.github.com/

git lfs install
...
git clone https://yourrepo.git;

Amazon Linux 2 AMI (HVM) - Kernel 5.10, SSD Volume Type / Arm

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

征棹 2025-01-20 18:00:54

借助 Amazon Linux 2,您可以使用 Extras 库在实例上安装应用程序和软件更新。这些软件更新称为主题。

步骤如下:

  1. 使用 SSH 连接到您的 EC2 Linux 实例。

  2. 使用 which 命令确认 amazon-linux-extras 软件包已安装:

    $ which amazon-linux-extras

    /usr/bin/amazon-linux-extras

如果未安装 amazon-linux-extras 软件包,您可以使用 yum 进行安装:

$ sudo yum install -y amazon-linux-extras

列出可用主题,您可以使用以下命令:

$ amazon-linux-extras list
  1. git-lfs 通常作为 epel-release 的一部分提供,因此您需要首先安装适用于 Amazon Linux 的 epel 版本:
    $ sudo amazon-linux-extras install epel -y 

对于 Amazon Linux AMI,请访问企业 Linux 的额外软件包(EPEL) 存储库已配置,但默认情况下未启用。

    $ sudo yum-config-manager --enable epel
  1. 现在你可以从 epel-release 安装 git-lfs 或任何你喜欢的东西:
    $ sudo yum install git-lfs

With Amazon Linux 2, you can use the Extras Library to install application and software updates on your instances. These software updates are known as topics.

Below are the steps:

  1. Connect to your EC2 Linux instance using SSH.

  2. Use the which command to confirm that the amazon-linux-extras package is installed:

    $ which amazon-linux-extras

    /usr/bin/amazon-linux-extras

If the amazon-linux-extras package isn't installed, you can use yum to install it:

$ sudo yum install -y amazon-linux-extras

To list the available topics, you can use the following command:

$ amazon-linux-extras list
  1. git-lfs usually comes as part of the epel-release, so you need to first to install epel release for Amazon Linux:
    $ sudo amazon-linux-extras install epel -y 

For the Amazon Linux AMI, access to the Extra Packages for Enterprise Linux (EPEL) repository is configured, but it is not enabled by default.

    $ sudo yum-config-manager --enable epel
  1. Now you can install git-lfs or whatever else you like from epel-release:
    $ sudo yum install git-lfs
哆兒滾 2025-01-20 18:00:54

如 packagecloud[1] 中所述,您需要运行:

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash

来安装依赖项和存储库。或者,您可以直接从 [1] 获取脚本。然后,您可以简单地使用 yum 安装:

sudo yum install git-lfs

[1] https://packagecloud.io /github/git-lfs/install#bash-rpm

As described on packagecloud[1], you need to run:

curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash

to install the dependencies and the repos. Alternatively you can take the script from [1] directly. You can then simply install with yum:

sudo yum install git-lfs

[1] https://packagecloud.io/github/git-lfs/install#bash-rpm

有深☉意 2025-01-20 18:00:54

您需要直接安装 ARM64 git-lfs 二进制文件:

wget https://github.com/git-lfs/git-lfs/releases/download/v3.1.2/git-lfs-linux-arm64-v3.1.2.tar.gz

sudo yum install git -y

tar -xvf git-lfs-linux-arm64-v3.1.2.tar.gz

sudo ./install.sh

git lfs install

现在,在 ARM64 上享受您的 GIT-LFS。

You need to directly install the ARM64 git-lfs binaries:

wget https://github.com/git-lfs/git-lfs/releases/download/v3.1.2/git-lfs-linux-arm64-v3.1.2.tar.gz

sudo yum install git -y

tar -xvf git-lfs-linux-arm64-v3.1.2.tar.gz

sudo ./install.sh

git lfs install

Now, enjoy your GIT-LFS on ARM64.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文