普通网友 2016-12-16 18:04
浏览 95
已采纳

Golang导入包错误

go:5:2: cannot find package "github.com/googollee/go-socket.io" in any of: /usr/local/go/src/github.com/googollee/go-socket.io (from $GOROOT) /Users/YoungHoonKim/Documents/chat/src/github.com/googollee/go-socket.io (from $GOPATH)

I'm getting this error while trying to compile my chat.go file with LiteIDE. I'm following a guide to build a chatserver, so I don't know where this package should be. any help?

  • 写回答

1条回答 默认 最新

  • duanhong4274 2016-12-16 19:13
    关注

    Double-check your actual go work directory with echo $GOPATH in your terminal. This will be your starting point to identify if you have this package at all, for example you should be able to see this package doing cd $GOPATH/src/github.com/googollee/go-socket.io.

    For more details on correct directory location (workspace in general) please check https://golang.org/doc/code.html

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码
  • ¥50 随机森林与房贷信用风险模型
  • ¥50 buildozer打包kivy app失败
  • ¥30 在vs2022里运行python代码
  • ¥15 不同尺寸货物如何寻找合适的包装箱型谱
  • ¥15 求解 yolo算法问题