Golang导入包错误

时间:2016-12-16 18:04:03

标签: go

  

go:5:2:找不到包" github.com/googollee/go-socket.io"在任何一个:       /usr/local/go/src/github.com/googollee/go-socket.io(来自$ GOROOT)       /Users/YoungHoonKim/Documents/chat/src/github.com/googollee/go-socket.io(来自$ GOPATH)

我在尝试使用LiteIDE编译[(['athens', 'greece', 'baghdad', 'iraq'], u'turkey', 'FALSE'), (['athens', 'greece', 'bangkok', 'thailand'], u'turkey', 'FALSE'), (['athens', 'greece', 'beijing', 'china'], u'albania', 'FALSE'), (['athens', 'greece', 'berlin', 'germany'], u'germany', 'TRUE'), (['athens', 'greece', 'bern', 'switzerland'], u'liechtenstein', 'FALSE'), (['athens', 'greece', 'cairo', 'egypt'], u'albania', 'FALSE'), (['athens', 'greece', 'canberra', 'australia'], u'liechtenstein', 'FALSE'), (['athens', 'greece', 'hanoi', 'vietnam'], u'turkey', 'FALSE'), (['athens', 'greece', 'havana', 'cuba'], u'turkey', 'FALSE'), (['athens', 'greece', 'helsinki', 'finland'], u'finland', 'TRUE'), (['athens', 'greece', 'islamabad', 'pakistan'], u'turkey', 'FALSE'), (['athens', 'greece', 'kabul', 'afghanistan'], u'albania', 'FALSE'), (['athens', 'greece', 'london', 'england'], u'italy', 'FALSE'), (['athens', 'greece', 'madrid', 'spain'], u'portugal', 'FALSE'), (['athens', 'greece', 'moscow', 'russia'], u'russia', 'TRUE'), (['athens', 'greece', 'oslo', 'norway'], u'albania', 'FALSE'), (['athens', 'greece', 'ottawa', 'canada'], u'moldova', 'FALSE'), (['athens', 'greece', 'paris', 'france'], u'france', 'TRUE'), (['athens', 'greece', 'rome', 'italy'], u'italy', 'TRUE'), (['athens', 'greece', 'stockholm', 'sweden'], u'norway', 'FALSE')] 文件时遇到此错误。我按照建立聊天服务器的指南,所以我不知道这个包应该在哪里。有什么帮助吗?

1 个答案:

答案 0 :(得分:2)

仔细检查终端中echo $GOPATH的实际工作目录。 这将是您确定是否拥有此软件包的起点,例如,您应该能够看到此软件包正在执行cd $GOPATH/src/github.com/googollee/go-socket.io

有关正确目录位置(一般工作区)的更多详细信息,请查看https://golang.org/doc/code.html