saml2aws icon indicating copy to clipboard operation
saml2aws copied to clipboard

saml2aws: command not found

Open ashwani29 opened this issue 3 years ago • 7 comments

I installed saml2aws following the below steps:

CURRENT_VERSION=$(curl -Ls https://api.github.com/repos/Versent/saml2aws/releases/latest | grep 'tag_name' | cut -d'v' -f2 | cut -d'"' -f1)
wget -c https://github.com/Versent/saml2aws/releases/download/v${CURRENT_VERSION}/saml2aws_${CURRENT_VERSION}_linux_amd64.tar.gz -O - | tar -xzv -C ~/.local/bin
chmod u+x ~/.local/bin/saml2aws
hash -r
saml2aws --version

but getting saml2aws command not found errors. Please help in resolving this.

OS: ubuntu-18.04

ashwani29 avatar Nov 29 '21 06:11 ashwani29

I have the same issue. Does anyone know is there's required also some manipulation with adding this to PATH or something?

OS: ubuntu-20.04.4

PS: Installed brew for linux to avoid this problem. But I think it's not kind of proper solution.

onecoldwhiteday avatar Feb 27 '22 12:02 onecoldwhiteday

@ashwani29 @onecoldwhiteday This works for me.

CURRENT_VERSION=$(curl -Ls https://api.github.com/repos/Versent/saml2aws/releases/latest | grep 'tag_name' | cut -d'v' -f2 | cut -d'"' -f1)
wget https://github.com/Versent/saml2aws/releases/download/v${CURRENT_VERSION}/saml2aws_${CURRENT_VERSION}_linux_amd64.tar.gz
tar -xzvf saml2aws_${CURRENT_VERSION}_linux_amd64.tar.gz
mv saml2aws /usr/local/bin/
chmod u+x /usr/local/bin/saml2aws
saml2aws --version

hcl1687 avatar Apr 23 '22 10:04 hcl1687

@hcl1687 The first line should be grep 'tag_name' not grep 't ag_name'

In full: CURRENT_VERSION=$(curl -Ls https://api.github.com/repos/Versent/saml2aws/releases/latest | grep 'tag_name' | cut -d'v' -f2 | cut -d'"' -f1)

Asher24 avatar May 17 '22 08:05 Asher24

@hcl1687 minor correction here, replace the t ag_name , CURRENT _VERSION with tag_name and CURRENT_VERSION. In my case, I do ssh through vscode to ubuntu vm, inside vm terminal it is working but through vscode ssh it is giving error. But your solution is working for now.

ashwani29 avatar May 25 '22 03:05 ashwani29

@Asher24 @ashwani29 Done. Thank you!

hcl1687 avatar Jun 01 '22 06:06 hcl1687

@ashwani29 @onecoldwhiteday This works for me.

CURRENT_VERSION=$(curl -Ls https://api.github.com/repos/Versent/saml2aws/releases/latest | grep 'tag_name' | cut -d'v' -f2 | cut -d'"' -f1)
wget https://github.com/Versent/saml2aws/releases/download/v${CURRENT_VERSION}/saml2aws_${CURRENT_VERSION}_linux_amd64.tar.gz
tar -xzvf saml2aws_${CURRENT_VERSION}_linux_amd64.tar.gz
mv saml2aws /usr/local/bin/
chmod u+x /usr/local/bin/saml2aws
saml2aws --version

This did it or me however I needed to do sudo mv saml2aws /usr/local/bin/

Ahmad-HosseiniMighani avatar Feb 02 '23 12:02 Ahmad-HosseiniMighani

Just need to update PATH

export PATH="$PATH:$HOME/.local/bin/"

mdragoss avatar Sep 08 '23 13:09 mdragoss

Closing this issue as a recently merged PR has an update README to cover Ubuntu-specific instructions #1238 .

Thank you everyone who has contributed to this discussion.

tinaboyce avatar Mar 19 '24 11:03 tinaboyce