Skip to content

Instantly share code, notes, and snippets.

@masudcsesust04
Created January 22, 2018 12:32
Show Gist options
  • Save masudcsesust04/3c8ba2390fcd49e61851e92ea19907e2 to your computer and use it in GitHub Desktop.
Save masudcsesust04/3c8ba2390fcd49e61851e92ea19907e2 to your computer and use it in GitHub Desktop.
Fix sdk command not found after installing SDKMAN

Fix sdk command not found after installing SDKMAN.

You need to install following packages before installing sdkman:

sudo apt-get install unzip
sudo apt-get install zip
sudo apt-get install sed

Uninstall skdman if you installed already:

$ tar zcvf ~/sdkman-backup_$(date +%F-%kh%M).tar.gz -C ~/ .sdkman
$ rm -rf ~/.sdkman

Then reinstalled sdkman:

$ curl -s "https://get.sdkman.io" | bash

Next, open a new terminal or enter:

$ source "$HOME/.sdkman/bin/sdkman-init.sh"

Lastly, run the following code snippet to ensure that installation succeeded:

$ sdk version
@joelsonejr
Copy link

Has anyone received this error message:

error: Found argument '-n' which wasn't expected, or isn't valid in this context

USAGE:
fd [FLAGS/OPTIONS] [] [...]

For more information try --help
/home/jonpop/.sdkman/bin/sdkman-init.sh:162: command not found: __sdkman_echo_debug
/home/jonpop/.sdkman/bin/sdkman-init.sh:196: command not found: __sdkman_echo_debug

I'm using sdkman with zsh (oh-my-zsh + powerlevel10k)

@srpr0grammer
Copy link

srpr0grammer commented Mar 31, 2023

Thank you so much man !!!!

@JoabeValverde
Copy link

Thanks my friends :D

@giakhanhcoder
Copy link

thanks broo

@xiaoxinmiao
Copy link

thanks, my brother

@gustavo-p0
Copy link

Thank you so much!

@danrocsan
Copy link

Thanks!

@rafaelsouza-hotmart
Copy link

Thanks!

@Guilherme-Araujo-Dev
Copy link

Has anyone received this error message:

error: Found argument '-n' which wasn't expected, or isn't valid in this context

USAGE: fd [FLAGS/OPTIONS] [] [...]

For more information try --help /home/jonpop/.sdkman/bin/sdkman-init.sh:162: command not found: __sdkman_echo_debug /home/jonpop/.sdkman/bin/sdkman-init.sh:196: command not found: __sdkman_echo_debug

I'm using sdkman with zsh (oh-my-zsh + powerlevel10k)

Sometimes an alias or 'find be like' is causing conflict. This error happened to me and I had to remove this alias:

alias find="fdfind"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment