0

I have a binary file that shows [URL] [port number] when I run it on Linux. I want the same thing to happen in the Pi, but instead I get

cannot execute binary file

Is there anything I could do to get the output without using the cross compiler? If not please help me in using the cross compiler!!

1

Is there anything I could do to get the output without using the cross compiler?

Yes, you can use the native compiler on the pi.

If not please help me in using the cross compiler!!

This is not a coherent or complete question.

  • i tried the native compiler and i get the same error – ashwin Mar 3 '16 at 9:33
  • I am inclined to close this This is not a coherent or complete question. – Ghanima Jun 1 '16 at 15:11
  • @ashwin: I don't think you did... Please edit your question to show the commands you used on the Raspberry Pi. – Jacobm001 Jun 1 '16 at 15:43
1

I suspect that the program you are running is developed for a Intel based computer. A program compiled on that computer will not run native on the Raspberry Pi.

You will need to port and compile that code on the Raspberry Pi.

1

Is there anything I could do to get the output without using the cross compiler?

Yes, as Goldilocks mentioned, you can compile the software directly on the Raspberry Pi itself. Short of that, you need to setup a cross compiler. How you do that is well outside the scope of this site. This is not a tutorial service.

Your problem seems to stem from the a lack of understanding the Raspberry Pi's processor. Unlike your desktop or laptop computer that you're compiling the program on (Intel x86), the Raspberry Pi 2 runs an ARM Cortex A-7 processor. These two things are fundamentally different, and are not compatible. Our blog post goes into that in more detail.

  • I have a binary file could be read as I do not have source files. – Ghanima Jun 1 '16 at 15:39
  • @Ghanima: I didn't consider that. Mentioning the cross compiler made me assume he had something to... you know... compile. – Jacobm001 Jun 1 '16 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.