standard_init_linux.go:178: exec user process caused no such file or directory
生活随笔
收集整理的這篇文章主要介紹了
standard_init_linux.go:178: exec user process caused no such file or directory
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
golang docker build 制作完進項后運行報錯
出現該問題的原因是編譯的環境和運行的環境不同,可能有動態庫的依賴
1.默認go使用靜態鏈接,在docker的golang環境中默認是使用動態編譯。
2.如果想使用docker編譯+alpine部署,可以通過禁用cgoCGO_ENABLED=0來解決。
3.如果要使用cgo可以通過go build --ldflags "-extldflags -static"?來讓gcc使用靜態編譯。
?
?
?
參考:?https://yryz.net/post/golang-docker-alpine-start-panic.html
?
轉載于:https://www.cnblogs.com/davygeek/p/10969434.html
總結
以上是生活随笔為你收集整理的standard_init_linux.go:178: exec user process caused no such file or directory的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mobile
- 下一篇: selenium3+python-多窗口