异常
Sai_BAN
这个作者很懒,什么都没留下…
展开
-
9、Library not loaded: /Users/lizhen/go/bin/lib/libprotobuf.20.dylib Referenced from: /Users/lizhen/g
Library not loaded: /Users/lizhen/go/bin/lib/libprotobuf.20.dylibReferenced from: /Users/lizhen/go/bin/protobuf/bin/protocReason: tried: ‘/Users/lizhen/go/bin/lib/libprotobuf.20.dylib’ (no such file), ‘/usr/local/lib/libprotobuf.20.dylib’ (no such file),原创 2022-01-14 10:17:37 · 464 阅读 · 0 评论 -
Incorrect table definition; there can be only one auto column and it must be defined as a key
是因为自己定义了的主键和gorm.Model里的ID主键冲突了。改了就好了。原创 2022-01-14 10:16:38 · 149 阅读 · 0 评论 -
goland中使用gin渲染html文件时出现 pattern matches no files: 错误
工作目录的问题,在edit configuration里面修改原创 2022-01-14 10:15:50 · 647 阅读 · 0 评论 -
Error: Unknown command: cask
原因是新版本的 homebrew 已经取消了 cask 这条命令,把原先的安装命令:brew cask install docker改成:brew install --cask docker原创 2022-01-14 10:15:12 · 584 阅读 · 0 评论 -
panic: runtime error: invalid memory address or nil pointer dereference
错误原因:控制台结果解释:var tmp *int之后:&tmp=0xc00000e028,tmp=nil在go里面:&取变量所在地址 *取指针指向的地址的值。如下图:所以上面 tmp=nil,其实就是指针指向的地址值=nil,即还没有指定地址。而*tmp是给指针指向的地址赋值,相当于给nil赋值。这肯定会报空指针了。...原创 2022-01-14 10:14:11 · 1619 阅读 · 0 评论 -
import “github.com/gin-gonic/gin“ 爆红
4、代码package mainimport "github.com/gin-gonic/gin"func main() { r := gin.Default() r.GET("/ping", func(c *gin.Context) { c.JSON(200, gin.H{ "message": "pong", }) }) r.Run() // listen and serve on 0.0.0.0:80原创 2022-01-14 10:12:22 · 2503 阅读 · 0 评论 -
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at:
3、如果仍出现异常xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/Comm解决:在命令行里输入xcode-select --install原创 2022-01-14 10:11:01 · 305 阅读 · 0 评论 -
安装gin失败 # cd .; git clone -- https://github.com/gin-gonic/gin xcrun: error: invalid active develope
错误:#cd .; git clone – https://github.com/gin-gonic/gin /Users/lizhen/go/src/github.com/gin-gonic/ginxcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrunpac原创 2022-01-14 10:09:16 · 713 阅读 · 1 评论 -
Run after the build is not possible The ‘main‘ file has the non-main package or does not contain
改成这个就好了原创 2022-01-14 10:06:46 · 326 阅读 · 0 评论 -
Error response from daemon: driver failed programming external connectivity on endpoint xenodochial_
Bind for 0.0.0.0:6379 failed: port is already allocated.原创 2021-05-09 13:47:25 · 500 阅读 · 0 评论