我已经设置了$GOPATH,并导入了$GOPATH / src中存在的源代码的某些部分。我需要导入的软件包是由我编写的,并存储在GOPATH / src中,我将其命名为otelkafkago,它的路径是GOPATH / src / otelkafkago我的HardDisk上还有一个代码库,当我尝试编译它时,它给了我main.go:51:2: package otelkafkago is not in GOROOT (/usr/local/go/src/otelkafkago)我已将其导入为import( "otelkafkago")以下是我在构建过程中的屏幕截图,kshitijpatil@PNQ-KPATIL checkoutservice % echo $GOPATH/Users/kshitijpatil/go/kshitijpatil@PNQ-KPATIL checkoutservice % go buildmain.go:51:2: package otelkafkago is not in GOROOT (/usr/local/go/src/otelkafkago)kshitijpatil@PNQ-KPATIL checkoutservice % env GOPATH=/Users/kshitijpatil/go go buildmain.go:51:2: package otelkafkago is not in GOROOT (/usr/local/go/src/otelkafkago)kshitijpatil@PNQ-KPATIL checkoutservice %
- 1 回答
- 0 关注
- 99 浏览
添加回答
举报
0/150
提交
取消