VSCode中go命令报错
文章摘要
                        
                        AI
                    AI初始化中...
                    前往tianli博客
                    此内容根据文章内容生成,并经过人工审核,仅用于文章内容的解析与总结
                本文最后更新于 2024-04-24,请注意辨别文章的编写时间哦。
问题背景
在PowerShell是正常的,在VSCode和Goland的终端中执行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.
解决方案
请尝试在VSCode终端中运行以下命令:
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")
它将使当前的PowerShell实例从计算机加载最新的PATH变量
            本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 归墟
        
     评论
            
                匿名评论
                隐私政策
            
            
                你无需删除空行,直接评论以获取最佳展示效果
            
         
            
         
                 
                                     
                                    