I installed sdkman in my mac machine and after completion of installation steps and when I tried for sdk to install lazybones in my computer, I am getting error as "sdk command is not found". If anybody have any solution, please let me know.
Very simple in case you use MAC & OH MY ZSH
step 1:
vim ~/.zshrc
step 2:(Add at the end of the file)
source ~/.bash_profile;
step 3:(Execution shell)
> source ~/.bash_profile
You can use sdkman : ➜ sdk
We periodically need to update the local cache. Please run:
$ sdk update
BINGO!!!
echo 'source "$HOME/.sdkman/bin/sdkman-init.sh"' >> ~/.zshrc
and source ~/.zshrc
. –
Tola you should append those two lines inside your .bash_profile file.
Usually located in your $HOME Tap nano $HOME/.bash_profile
and then append those two lines at the end the file using your prefered editor (nano,vim..):
# SDK Man replaced GVM. Using for Groovy, Gradle, and Maven Version Management
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
you can refer to this link: https://www.bonusbits.com/wiki/HowTo:Install_SDKMan_on_MacOS_or_Linux
curl
resulted in it concatenating those lines into ~/.zshrc
at the bottom of the file. Issue is, the location I have set up is ~/.zsh/.zshrc
. So worth a check. I stumbled across it by accident because I ran vi ~/.zshrc
instead of my usual filepath. To avoid issues like this, it may be good to create a symbolic link there. –
Simile Try this,
Step-1:
curl -s https://get.sdkman.io | bash
Step-2:
source "$HOME/.sdkman/bin/sdkman-init.sh"
If you already installed SDK please close the terminal and open again.
if you haven't installed it open your terminal & write
curl -s https://get.sdkman.io | bash
Follow up from @niels's answer on win10, I got /home/<my_user_name>/.sdkman/bin/sdkman-init.sh:162: command not found: __sdkman_echo_debug
because the find
command was coming from windows/system32
, as I do where find
gives me:
where find
/cygdrive/c/Windows/system32/find
/usr/bin/find
So make sure you didn't mess up with Cgywin's default $PATH
. By default, cygwin's bash has /usr/bin/
in front of windows's system32
folder.
I would like to add to the solution provided by @Bachiri Taoufiq Abderrahman.
But one needs to verify which shell he/she is using, run echo $0
to verify the name of the shell.
And based on if its zsh or bash edit ~./zprofile
or ~/.bash_profile
files.
And add the following lines
# SDK Man replaced GVM. Using for Groovy, Gradle, and Maven Version Management export SDKMAN_DIR="$HOME/.sdkman" [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
Make sure that these are added at the end of the page or that there is no more entry in the file after this particular entry
If you have the problem at windows: On windows mostly the find-command isn't found. Add in .bashrc the following
export PATH=/usr/bin:$PATH
this ensures that the linux find is used instead of the windows one.
I resolved it problem configuring the default version of gradle with it command:sdk install gradle && sdk default gradle
© 2022 - 2024 — McMap. All rights reserved.