moovweb / gvm

Go Version Manager
http://github.com/moovweb/gvm
MIT License
9.91k stars 522 forks source link

Stuck on `Install package` when calling `gvm use` #373

Closed ofey404 closed 2 years ago

ofey404 commented 3 years ago

Hey there! I'm a newbie to gvm, wanna get some help ❤️

I installed go1.3 with gvm install go1.3 --binary, then when I want to activate my environment, it always requires me to install two packages, blocking the input:

08:13 $ gvm use go1.3
Now using version go1.3
Install package 'git-core' to provide command 'git'? [N/y] Install package 'autojump' to provide command 'autojump'? [N/y] 
# I can't input anything.

Maybe there are some conflict in my bashrc, cause when I start from a clean bash, gvm just works file.

bash-5.0$ [[ -s "/home/ofey/.gvm/scripts/gvm" ]] && source "/home/ofey/.gvm/scripts/gvm"
bash-5.0$ gvm use go1.3
Now using version go1.3
bash-5.0$ go version
go version go1.3 linux/amd64

Here is my bashrc.

I commented two suspicious line:

# [[ $- == *i* ]] && source /opt/bash-git-prompt/gitprompt.sh
# [[ -f /etc/profile.d/autojump.sh ]] && source /etc/profile.d/autojump.sh

Then I can input, but it just keeps bursting some error messages. Besides, some builtin commands like grep is lost.(Cause my $PATH is gone?)

[ofey@RX93 dotfiles]$ gvm use go1.3
Now using version go1.3
[ofey@RX93 dotfiles]$ Install package 'autojump' to provide command 'autojump'? [N/y] 

[ofey@RX93 dotfiles]$ Install package 'autojump' to provide command 'autojump'? [N/y] 
grep
bash: grep: command not found...
Install package 'grep' to provide command 'grep'? [N/y] n

[ble: exit 127]
[ofey@RX93 dotfiles]$ Install package 'autojump' to provide command 'autojump'? [N/y] 

[ofey@RX93 dotfiles]$ Install package 'autojump' to provide command 'autojump'? [N/y] 
echo $PATH
/home/ofey/.gvm/pkgsets/go1.3/global/bin:/home/ofey/.gvm/gos/go1.3/bin:/home/ofey/.gvm/pkgsets/go1.3/global/overlay/bin:/home/ofey/.gvm/bin:/home/ofey/.gvm/bin:Error: : is not a valid task number!
[ofey@RX93 dotfiles]$ Install package 'autojump' to provide command 'autojump'? [N/y] 

Thank you for your attention! ⭐

luisfelipe3d commented 2 years ago

any update?

ofey404 commented 2 years ago

It's fine to close this issue, I have no progress since then ;)