vagrant@precise64:/vagrant$ sudo ./myprogram
./myprogram: 1: ./myprogram: Syntax error: "(" unexpected
I found out this happens when I do not generate the binary file from the same OS. I do go build
with Mac OS but I need to run this binary from Vagrant that uses Ubuntu Linux. What command should I use instead of go build
from Mac so that I can run the binary program in Vagrant environment?