As the title says, I am wondering how to cross-compile my program so that I can run it on a 64-bit version of Ubuntu
I went into the folder /usr/local/go/srcand ran
GOOS=linux GOARCH=amd64 ./make.bash --no-clean
everything compiled fine
then I went into my project directory and started go build -v -a, and then took the compiled binary and moved it to my Linux server, but when I start, I get this error:
root@PanicCSGO40:~/test
-bash: ./test: cannot execute binary file: Exec format error
root@PanicCSGO40:~/test
./test: 1: ./test: Syntax error: "(" unexpected
root@PanicCSGO40:~/test
Not sure what I'm doing wrong, any information would be greatly appreciated.
I also tried to do this with help GOARCH=386, but still getting the same errors. Thanks!
, , - bash, , , , .