Beego: 升级 macos 10.12.4 后 beego 跑不起来了

Created on 29 Mar 2017  ·  7Comments  ·  Source: astaxie/beego

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go and beego are you using (bee version)?
    Go 1.8
    beego 1.8

  2. What operating system and processor architecture are you using (go env)?

GOHOSTARCH="amd64"
GOHOSTOS="darwin"

  1. What did you do?

升级 macos 10.12.4

  1. What did you expect to see?

正常运行

  1. What did you see instead?

升级 macos 10.12.4 后 beego 跑不起来了

bee run

2017/03/28 17:06:08 SUCCESS  ▶ 0009 Built Successfully!
2017/03/28 17:06:08 INFO     ▶ 0010 Restarting 'medsearch'...
2017/03/28 17:06:08 SUCCESS  ▶ 0011 './medsearch' is running...

一直是 running,到不了打开端口那块

Most helpful comment

go build -ldflags -s

All 7 comments

有设置安全策略吗?看下设置里的安全与防火墙

幸好没升级

是一个Mac的BUG

go build -ldflags -s

如果不适用gdb debug 可以临时 ln -s /usr/bin/true /usr/local/bin/dsymutil 解决

If you build with -ldflags -s, which drops the DWARF information from the executable, then codesign produces a valid binary. I think this is mostly not Go's fault (except that Go works hard to put DWARF info in the binaries, unlike most OS X programs). Certainly for Go 1.5 but possibly long term we can suggest that people who need codesign can use -ldflags -s.

Was this page helpful?
0 / 5 - 0 ratings