Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

bash: sudo: command not found

Christian Ribeaud November 7, 2017

Hi,

Following the instructions given here, I am running following executions at some point in my Bitbucket Pipeline:

- curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
- chmod +x ./kubectl
- sudo mv ./kubectl /usr/local/bin/kubectl

However the build fails with following error:

+ sudo mv ./kubectl /usr/local/bin/kubectlbash: sudo: command not found

Why? Any hint? Thanks in advance.

Cheers and have a nice one,

christian

 

1 answer

0 votes
Lars Olav Velle
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 7, 2017

which sudo

Output is something like this: /usr/bin/sudo

 

Try providing the full path to the sudo command

Christian Ribeaud November 9, 2017

I've found out that I actually do NOT need sudo. It seems that I'm already root. Thanks and cheers,

christian

Lars Olav Velle
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 9, 2017

Probably not a good idea, but thats your decicion. 

Please mark question as solved. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events