[root@host up]# ./main [ORM]2018/10/02 01:48:15 register db Ping `default`, Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub must have one register DataBase alias named `default` [root@host up]#
The web application written by beego is cross-compiled into Linux version under Mac OS and cannot be executed. After opening CGO, it cannot be compiled and passed. What is the reason?
Can go-sqlite3 only install the go environment on Linux and then compile?
Parameters for cross-compiling linux on mac:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
Have you filled it in correctly?