2

Am running into a "cannot execute binary file: Exec format error" when running the following command from the below repository:

go mod download github.com/cih-y2k/wedeploy-gosocketio

https://github.com/kuoyaoming93/guardian-mainnet-guide/blob/master/docs/COMPILE_ARM64.md#install-guardian-node-from-source-code

Have deleted and re-downloaded the necessary directories, wasn't the solution.

Does this mean I need to download another language for this file to execute?

Thank you!

T3Crypto
  • 43
  • 5
  • 0xDbdA8a3a66E17C8964e0001211Dc3a3E08780BA0a9e4a90429be30bb54c1f5845fb00367e1d6ff791ec14dbfe75387c1bf1059872811ccd2306d31b7733b74e2fa772c9894e28b4e4b2faca0d5625e0e119ef1fd2362ba62e4325a85f926db25290f8819097d0e7282b0c0b23d5d7f92c212c9d117e33be95f5ae87f802914848ea04eb9585bacbf5aa2a3c562e6980c9b6b7c33ddbe3c611b8b1817c81e4846ebc7a3aa1629d405ac6be5c3cdad3b9dbc5eff9ba15890eb359bcdaf645fbaa91486e62d2dd1dcbee44b8ca089e95bfb44f5b30051e3b9d7aee9b2064cde145eeedef74101 – T3Crypto Sep 19 '22 at 21:52
  • 94e28b4e4b2faca0d5625e0e119ef1fd2362ba62e4325a85f926db25290f8819097d0e7282b0c0b23d5d7f92c212c9d117e33be95f5ae87f802914848ea04eb9585bacbf5aa2a3c562e6980c9b6b7c33ddbe3c611b8b1817c81e4846ebc7a3aa – T3Crypto Sep 20 '22 at 11:23

1 Answers1

2

My recommendation is to follow all the steps mentioned to use theta with arm64, otherwise you could be using the binaries from another arch like amd64.

I did a quick check in my raspberry and no problem reported, since the go.mod file has been replaced. with a new one with correct branches.

Finally, cannot execute binary file: Exec format error means that you are using binaries that doesn't match with the current host architecture, in this case arm64.

 pi@raspberrypi  ~/go/src/github.com/thetatoken/theta   release  sed 's/v0.0.0-20200107021104-147ed25f233e/v0.0.0-20220216073600-600054663ec1/' go.mod > aux_file
 pi@raspberrypi  ~/go/src/github.com/thetatoken/theta   release 
 pi@raspberrypi  ~/go/src/github.com/thetatoken/theta   release  sed 's/github.com\/wedeploy\/gosocketio v0.0.7-beta/github.com\/cih-y2k\/wedeploy-gosocketio v0.0.8/' aux_file > aux_file2
 pi@raspberrypi  ~/go/src/github.com/thetatoken/theta   release 
 pi@raspberrypi  ~/go/src/github.com/thetatoken/theta   release  rm go.mod
 pi@raspberrypi  ~/go/src/github.com/thetatoken/theta   release ±  cp aux_file2 go.mod
 pi@raspberrypi  ~/go/src/github.com/thetatoken/theta   release ±  rm aux_file aux_file2
 pi@raspberrypi  ~/go/src/github.com/thetatoken/theta   release ±  go mod download github.com/cih-y2k/wedeploy-gosocketio
 pi@raspberrypi  ~/go/src/github.com/thetatoken/theta   release ± 

Since raspberry is Linux based you can use the following to verify the arch:

pi@raspberrypi  ~  arch ; uname -m
armv6l
armv6l

Go Env is also a check you should do:

pi@raspberrypi  ~  go env | grep -i ARCH
GOARCH="arm"
GOHOSTARCH="arm"
elulcao
  • 470
  • 4
  • 15
  • 1
    Great recommendation with detailed insight. How am I able to ensure that I am running with the arm64 architecture? Completed every step leading up to the error. Am currently working with the 128GB sim card preinstalled with NOOBS, running Raspberry OS. – T3Crypto Aug 14 '22 at 19:46
  • 1
    Working with a Raspberry Pi 4, for sure would support this ARM64 structure. Thought that it would automatically be running as an ARM64. Is there a possibility that 'bash' is getting in the way? – T3Crypto Aug 14 '22 at 19:53
  • Thank you again! Getting very close... Downloaded 64-bit Raspberry OS onto a new MSD and started from scratch. Made it all the way to the launch, and then ran into the cannot execute binary file: Exec format error once again. Then launched your tests as recommended: – T3Crypto Aug 15 '22 at 10:59
  • thetaberry-t3@raspberrypi:~ $ arch ; uname -m aarch64 aarch64 thetaberry-t3@raspberrypi:~ $ go env | grep -1 ARCH GO111MODULE="on" GOARCH="arm64" GOBIN="" -- GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="linux" – T3Crypto Aug 15 '22 at 11:02
  • There must be a way to change the arch to the arm, correct? – T3Crypto Aug 15 '22 at 11:04