Home > database >  Git Large File Storage / How to install git lfs on AWS EC2 Linux 2 / "No package git-lfs availa
Git Large File Storage / How to install git lfs on AWS EC2 Linux 2 / "No package git-lfs availa

Time:03-14

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

CodePudding user response:

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

CodePudding user response:

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.

CodePudding user response:

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

  2. Now you can install git-lfs or whatever else you like from epel-release:

    $ sudo yum install git-lfs

  • Related