I am trying to install git-lfs package and it looks like expected paths are not Ubuntu friendly. From Downloads section of git-lfs I choose Linux AMD64 file name git-lfs-freebsd-amd64-1.2.1.tar.gz
, because .deb files are not available for Ubuntu, just Debian 7,8.
I am getting error: install.sh: 19: install.sh: PATH+=:/usr/local/bin: not found
when executing install.sh.
Does anyone have a working solution on how to install git-lfs?
There are in fact
.deb
files at https://packagecloud.io/github/git-lfs?filter=debs that you can install; the link you visited also hinted at this by stating that "All packages are available on PackageCloud now."In any case, if you visit https://git-lfs.github.com/, the simplest way to install
git-lfs
is to follow the instructions at https://packagecloud.io/github/git-lfs/install:Then, according to https://github.com/github/git-lfs/blob/master/INSTALLING.md#installing-packages, do
If you don't trust the source of
script.deb.sh
and are uncomfortable with running the script withsudo bash
, you should definitely take a look at the script first.I was looking for a way to install entirely from the command line (server/VM setup), and was able to do so by following the instructions from the documentation, copied below for reference.
sudo apt-get install software-properties-common
sudo curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
*sudo apt-get install git-lfs
git lfs install
*The sudo in step 2 is my addition, and without it this step was failing silently. Maybe to do with my user permissions on the server? ymmv
I found my solution, the problem was executing install.sh using
sh
:The correct way is
sudo ./install.sh
orsudo bash install.sh
instead ofsh install.sh
.If anybody finds this thread from Google and is on a modern Ubuntu build (at least 21.04+), simply do
sudo apt install git-lfs