升級go1.10後打包出錯
小白請教:
之前 1.8 和 1.9 都正常,今天升級到 1.10 發現打包出來的執行檔案執行報錯 在 mac 和 win10 打包成 linux bee pack -be=GOOS=linux 執行時:
panic: you are in dev mode. So please set gopath
goroutine 1 [running]:
github.com/astaxie/beego.(*ControllerRegister).Include(0xc4200c0790, 0xc4201dfc30, 0x1, 0x1)
E:/m/go/src/github.com/astaxie/beego/router.go:231 +0x789
github.com/astaxie/beego.(*Namespace).Include(0xc4202290a0, 0xc4201dfc30, 0x1, 0x1, 0xc4202290a0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:186 +0x4d
github.com/astaxie/beego.NSInclude.func1(0xc4202290a0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:302 +0x46
github.com/astaxie/beego.NewNamespace(0xaae8aa, 0x9, 0xc42008d388, 0x1, 0x1, 0xc420231101)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
github.com/astaxie/beego.NSNamespace.func1(0xc420229080)
E:/m/go/src/github.com/astaxie/beego/namespace.go:386 +0x52
github.com/astaxie/beego.NewNamespace(0xaae88f, 0x9, 0xc420183e98, 0x18, 0x18, 0xc420231170)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
aaa-api/routers.init.1()
E:/m/go/src/aaa-api/routers/router.go:20 +0x17f4
panic: you are in dev mode. So please set gopath
goroutine 1 [running]:
github.com/astaxie/beego.(*ControllerRegister).Include(0xc4200c0840, 0xc4201dfc30, 0x1, 0x1)
E:/m/go/src/github.com/astaxie/beego/router.go:231 +0x789
github.com/astaxie/beego.(*Namespace).Include(0xc42022b0c0, 0xc4201dfc30, 0x1, 0x1, 0xc42022b0c0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:186 +0x4d
github.com/astaxie/beego.NSInclude.func1(0xc42022b0c0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:302 +0x46
github.com/astaxie/beego.NewNamespace(0xaae8aa, 0x9, 0xc42008d388, 0x1, 0x1, 0xc420235101)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
github.com/astaxie/beego.NSNamespace.func1(0xc42022b0a0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:386 +0x52
github.com/astaxie/beego.NewNamespace(0xaae88f, 0x9, 0xc420185e98, 0x18, 0x18, 0xc420235170)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
aaa-api/routers.init.1()
E:/m/go/src/aaa-api/routers/router.go:20 +0x17f4
panic: you are in dev mode. So please set gopath
goroutine 1 [running]:
github.com/astaxie/beego.(*ControllerRegister).Include(0xc4200ae6e0, 0xc4201cbc60, 0x1, 0x1)
E:/m/go/src/github.com/astaxie/beego/router.go:231 +0x789
github.com/astaxie/beego.(*Namespace).Include(0xc4202150e0, 0xc4201cbc60, 0x1, 0x1, 0xc4202150e0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:186 +0x4d
github.com/astaxie/beego.NSInclude.func1(0xc4202150e0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:302 +0x46
github.com/astaxie/beego.NewNamespace(0xaae8aa, 0x9, 0xc42000d398, 0x1, 0x1, 0xc420221101)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
github.com/astaxie/beego.NSNamespace.func1(0xc4202150c0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:386 +0x52
github.com/astaxie/beego.NewNamespace(0xaae88f, 0x9, 0xc420169e98, 0x18, 0x18, 0xc420221170)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
aaa-api/routers.init.1()
E:/m/go/src/aaa-api/routers/router.go:20 +0x17f4
panic: you are in dev mode. So please set gopath
goroutine 1 [running]:
github.com/astaxie/beego.(*ControllerRegister).Include(0xc4200c0790, 0xc4201dfc30, 0x1, 0x1)
E:/m/go/src/github.com/astaxie/beego/router.go:231 +0x789
github.com/astaxie/beego.(*Namespace).Include(0xc4202270c0, 0xc4201dfc30, 0x1, 0x1, 0xc4202270c0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:186 +0x4d
github.com/astaxie/beego.NSInclude.func1(0xc4202270c0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:302 +0x46
github.com/astaxie/beego.NewNamespace(0xaae8aa, 0x9, 0xc42008d388, 0x1, 0x1, 0xc420233101)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
github.com/astaxie/beego.NSNamespace.func1(0xc4202270a0)
E:/m/go/src/github.com/astaxie/beego/namespace.go:386 +0x52
github.com/astaxie/beego.NewNamespace(0xaae88f, 0x9, 0xc420183e98, 0x18, 0x18, 0xc420233170)
E:/m/go/src/github.com/astaxie/beego/namespace.go:42 +0x8c
aaa-api/routers.init.1()
E:/m/go/src/aaa-api/routers/router.go:20 +0x17f4
我是用 Supervisord 部署的,之前一直正常。 然後把模式又 dev 轉成 prod 就不報錯了,為什麼呢?都只能用 prod 了?
更多原創文章乾貨分享,請關注公眾號
- 加微信實戰群請加微信(註明:實戰群):gocnio
相關文章
- [BUG反饋]升級後獨立模型出錯模型
- pip 升級後runpy.py報錯
- 升級Win11後 我的docker-compose ps 出錯Docker
- 【Python】升級python後pip報錯Python
- python3升級後的報錯Python
- vaio升級win10會出錯嗎AIWin10
- 客戶資料庫升級後出現ORA-30004錯誤資料庫
- 打包升級:node-cron原理詳解
- activemq升級報錯MQ
- 升級win10後出現80240020錯誤程式碼怎麼辦Win10
- 升級win10後出現藍屏錯誤INTERNAL_POWER_ERROR怎麼辦Win10Error
- 資料庫升級後匯出報EXP-00056錯誤解決辦法資料庫
- VSCode外掛開發全攻略(十)打包、釋出、升級VSCode
- 資料庫升級後goldengate報錯,ORA-04045資料庫Go
- 升級iOS11變磚怎麼辦? 手把手教你拯救升級出錯iPhoneiOSiPhone
- AS打包出現app:transformClassesAndResourcesWithProguardForRelease錯誤APPORM
- Linux升級核心後報No volume groups found錯誤Linux
- 升級win10後出現藍色畫面錯誤INTERNAL_POWER_ERROR怎麼辦Win10Error
- win10推送後如何升級 win10收到推送後怎麼升級Win10
- 【BUG系列】AndroidStudio打包出錯Android
- 資料庫升級報錯資料庫
- 9.2.0.4 升級到10.2.0.5升級後 Oracle Ultra Search 元件NO SCRIPTOracle元件
- Istio 升級後踩的坑
- vue-cli 專案打包後出現空白頁和路徑錯誤Vue
- flutter升級後 執行專案報錯 Warning: Podfile is out of dateFlutter
- 升級失敗後,在drop user時出現錯誤ORA-00600 kkpo_rcinfo_defstg:objnotfoundOBJ
- Project的一級WBS刪除後再建立出錯Project
- win10推送後怎麼升級_win10獲取推送後如何升級Win10
- oracle upgrade 升級前測試,升級後穩定計劃Oracle
- w10升級後黑屏修復方法_w10升級後黑屏如何處理
- Mac os 升級到11.0版本後 啟動擴充套件報錯Mac套件
- MacOS Big Sur11.0升級後Eclipse啟動報錯MacEclipse
- Windows XP 升級SP2後出現的若干問題(轉)Windows
- android 打包出現錯誤Error: ResourceNameAndroidError
- ant打包出現null returned: 1報錯Null
- 常見的 PostgreSQL 升級錯誤SQL
- oracle 升級報錯 NO pre-requistes......OracleUI
- 升級windows10系統後電腦攝像頭打不開提示出現錯誤如何解決Windows