dousi0144 2017-03-01 15:53
浏览 215

go get在依赖项中找不到导入文件

I am trying to use go get to download the "dlv" package but am running into the following error:

go get github.com/derekparker/delve/cmd/dlv       
# github.com/derekparker/delve/pkg/config
src/github.com/derekparker/delve/pkg/config/config.go:10:2: error: import file ‘gopkg.in/yaml.v2’ not found
  yaml "gopkg.in/yaml.v2"
  ^
src/github.com/derekparker/delve/pkg/config/config.go:69:8: error: reference to undefined name ‘yaml’
  err = yaml.Unmarshal(data, &c)

A similar thing happens when I try to install "go-plus" for atom. After exhausting research I am not sure what the problem is, my go env is:

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/martin/go"
GORACE=""
GOROOT="/usr"
GOTOOLDIR="/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1"
GO15VENDOREXPERIMENT="1"
CC="/usr/bin/gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="/usr/bin/g++"
CGO_ENABLED="1"

go version: go version go1.6.1 gccgo (GCC) 6.3.1 20170109 linux/amd64

I am able to install other packages with go get just fine, only when external dependencies are involved the import files cannot be found.

Any tips are greatly appreciated

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 保护模式-系统加载-段寄存器