I tried to install git-lfs using
sudo apt install git-lfs
but experienced the following error:
Reading package lists... Done Building dependency tree
Reading state information... Done
git-lfs is already the newest version (2.9.2). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up git-lfs (2.9.2) ... /usr/local/bin/git-lfs:
1: /usr/local/bin/git-lfs: ????: not found /usr/local/bin/git-lfs: 5: /usr/local/bin/git-lfs: Syntax error: end of file unexpected (expecting ")")
dpkg: error processing package
git-lfs (--configure): installed git-lfs package post-installation
script subprocess returned error exit status 2 Errors were encountered while processing: git-lfs
E: Sub-process /usr/bin/dpkg returned an error code (1)
The related solution in install git-lfs on Ubuntu 16.04 did not work for me either and flagged the same error. Does anyone have a workaround/solution?