标签:module missing 变量 src eve character user red iss
安装某个库的时候依赖于redis库,总是出现这样的错误:
go install
go: github.com/go-redis/redis/v7@v7.2.0: parsing go.mod: missing module line
猜测是redis库装错了,于是删除 C:\Users\ahfuzhang\go\src\github.com\go-redis,然后删除:C:\Users\ahfuzhang\go\pkg\mod\cache目录下所有文件。
尝试单独安装redis库:
go get -u github.com/go-redis/redis
go get github.com/go-redis/redis: module github.com/go-redis/redis: invalid character ‘.‘ after top-level value
出现错误后,尝试修改环境变量:
set GO111MODULE=on
重试 go get -u github.com/go-redis/redis 仍然不行。
【记录一个问题】go get -u github.com/go-redis/redis出现错误" invalid character '.' after top-level value"
标签:module missing 变量 src eve character user red iss
原文地址:https://www.cnblogs.com/ahfuzhang/p/12700793.html