-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
安装后,使用go -version报错 #85
Labels
bug
Something isn't working
Comments
使用的是哪个版本的Windows系统?Windows系统下创建软连接会优先调用 func mkSymlink(oldname, newname string) (err error) {
if runtime.GOOS == "windows" {
// Windows 10下无特权用户无法创建符号链接,优先调用mklink /j创建'目录联接'
if err = exec.Command("cmd", "/c", "mklink", "/j", newname, oldname).Run(); err == nil {
return nil
}
}
return os.Symlink(oldname, newname)
} |
碰到类似问题 已解决,可以先看看g.exe所在目录有没有go文件夹的快捷方式图标,如果没有就看看你登录用户(一般是C:\Users\你本地的用户名\.g)有没有go目录,有的话设置GOROOT=C:\Users\你本地的用户名\.g\go |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PS C:\Users\donghao\Desktop> g uninstall 1.18.9
Uninstalled go1.18.9
PS C:\Users\donghao\Desktop> g install 1.18.9
Computing checksum with SHA256
Checksums matched
Now using go1.18.9
PS C:\Users\donghao\Desktop> go -version
go: The term 'go' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
应该是软连接 没有创建成功,但是不知道哪里配置错误了,起码安装过程中没有报错,望指教
The text was updated successfully, but these errors were encountered: