You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Go新手安装github.com/westphae/geomag遇模块缺失问题求助

解决Go语言geomag仓库编译错误的步骤
  • 先克隆完整仓库到本地:
    git clone https://github.com/westphae/geomag.git
    cd geomag
    
  • 若仓库根目录无go.mod文件,初始化模块:
    go mod init github.com/westphae/geomag
    
  • 同步并下载依赖:
    go mod tidy
    
  • 编译目标命令:
    go build ./cmd/wmm_point
    

问题原因说明

你遇到的错误是因为internal/util这类内部包属于模块私有范围,Go不允许通过go get单独获取这类包。必须在整个仓库的模块上下文里操作,不能单独进入子目录执行go build。

内容的提问来源于stack exchange,提问作者Cristhian Castro

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 01:07:02