How do I run an exe file on my RPi 2 model B? I tried file Log.exe and got:

Log.exe: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0xf2b8654218e9f4d1dd3b2f2294de83f63de4f1b7, not stripped

How do I run this on my RPi - it's the only computer I have.


3 Answers 3


You would really need to make sure you have the latest version of Mono installed. There is a massive gap of features added from what is in the Jessie repo (current Raspbian) and what is available from source.

You can add the Xamarin repository and simply update (before we had to compile source code and it took 5-7hours!)

This ensures you are on the latest release 4.2 and you should be able to run console applications with out many problems. Make sure that any 3rd party dependencies can run on ARM though.

Any mono version below 3.8 is really buggy and 4 included .NET 5 implementation.


Do you have the Mono runtime environment installed on your Pi? If not then execute the following:

sudo apt-get install mono-runtime

Once you have the mono runtime installed you should be able to run your .exe executable.


Usage of mono is:

mono [options] program [program-options]

You can run your .exe file as follows:

mono Log.exe


mono-sgen Log.exe

which is the same as

mono --gc=sgen Log.exe

The difference is the Garbage Collector used. If not specified, then the more conservative BOEHM GC is used. I'm personally using SGEN most of the time because it seems to use much less memory. On the other hand I've seen situations where SGEN on my Raspberry Pi 2 got noticeable slower than BOEHM.

As already mentioned by @exaudio you install the mono runtime environment with:

sudo apt-get install mono-runtime

Or, in case you also want to use mcs to compile C# source files (.cs) into managed executable files (.exe):

sudo apt-get install mono-devel

In case you experience "assembly not found" errors you should go one step further and install mono-complete:

sudo apt-get install mono-complete

But be aware that with Mono 3.2.8 this takes about 166 MB extra memory from your SD card, so be warned and install it only if necessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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