普通网友 2013-10-01 05:08
浏览 7067
已采纳

“所选目录不是Go SDK的有效主目录”

I'm using IntelliJ Idea, and the google-go-lang-idea-plugin from:

https://github.com/mtoader/google-go-lang-idea-plugin/issues/173

When I try to add my APT provided Go installation to the Go SDK list, I get the following error

The selected directory is not a valid home for Go Sdk

I have tried adding the following directories as the Go SDK root

  • /usr/share/go/
  • /usr/share/src/
  • /usr/lib/go/
  • /usr/lib/go/src/
  • /usr/lib/go/pkg/
  • /usr/lib/go/pkg/linux_amd64

Does anyone know how to get this working? I've commented on the various issues in the bugtracker, however the maintainer claimed that this was fixed 10 months ago.

Failing that, does anyone know what this plugin is actually looking for that would make a directory look like the SDK directory?

  • 写回答

3条回答 默认 最新

  • dongping2023 2013-12-12 01:05
    关注

    It turns out that google-go-lang-idea-plugin requires a slightly different folder structure than the default apt install produces. To fix it:

    # mkdir /usr/lib/go/bin
    # ln -s /usr/bin/go    /usr/lib/go/bin/go
    # ln -s /usr/bin/godoc /usr/lib/go/bin/godoc
    # ln -s /usr/bin/gofmt /usr/lib/go/bin/gofmt
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100