Appimage cannot execute binary file exec format error

Hi "Brew01",

Hi «Brew01»,

Welcome to the wonderful world of Linux Mint and its excellent forum !

I just read your post and the good replies to it. Here are my thoughts on this as well.

It would help to know more about your system setup. If you run «inxi -Fxzd» from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.

In order to run applications packaged as an AppImage file (something.AppImage), you need to have the «fuse» package installed. I thought the «fuse» package was already installed in most Linux Mint versions. You can install it through the Software Manager or Synaptic Package Manager (SPM), or by using the console terminal command below.

And as was already stated, you have to have permission to run the file, if it was not packaged that way. You can right click the AppImage file, select properties, permissions tab, make sure to check the allow executable or executable, click apply, okay. Then, you can just double click the AppImage file to launch it, run it. You can also create new menu items and or desktop shortcut launchers; some AppImages will create these for you, others won’t.

How To Use AppImage in Linux [Complete Guide], October 27, 2017
https://itsfoss.com/use-appimage-linux/

«AppImages require FUSE to run. Filesystem in Userspace (FUSE) is a system that lets non-root users mount filesystems.»
https://github.com/AppImage/AppImageKit/wiki/FUSE

Note: Some software was specifically designed for a certain version of Linux, like Linux Mint 18 which is based on Ubuntu 16.04, so it might not work on Linux Mint 17.x based on Ubuntu 14.04. BUT, I have personally found out that most AppImages designed for the newer Linux Mint 18.x will run on my Linux Mint 17.x system.

Hope this helps …

Phd21: Mint 20 Cinnamon & xKDE (Mint Xfce + Kubuntu KDE) & KDE Neon 64-bit (new based on Ubuntu 20.04) Awesome OS’s, Dell Inspiron I5 7000 (7573) 2 in 1 touch screen, Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram, Intel 4 Graphics.

@vadi2

This AppImage is giving the following error on a 64bit Debian 9 VM: cannot execute binary file: Exec format error

Any ideas? The obvious architecture mismatch issue does not seem to be it.

Original ticket @ Mudlet/Mudlet#1229.

@probonopd

@TheAssassin

It doesn’t make much sense that it is in a tar archive. Since it is a single file, try to avoid the archiving step, and upload the AppImage as-is.

@vadi2

Github doesn’t support uploading AppImages as-is :(

@probonopd

Only that it isn’t even hosted on GitHub…

@probonopd

Github doesn’t support uploading AppImages as-is :(

It does, on GitHub Releases.

@vadi2

Does that affect it not running on Debian?

@probonopd

I don’t know but I consider that «AppImage» to be broken because it is not an AppImage,

@vadi2

@probonopd

Runs without problems on openSUSE LEAP 42.2.

@vadi2

Runs without problems on Ubuntu too. Neither are Debian…

I feel like there’s no interest in actually helping solve the issue I’m having here.

@probonopd

I cannot reproduce this issue using debian-live-8.6.0-amd64-xfce-desktop.iso. Please use one of the Debian Live ISOs to test against. Otherwise we are testing a «moving target».

@itsTheFae

I get these errors when running a fresh install of both Debian 8.5 and Debian 9.0.1. I installed both versions to separate VirtualBox VMs using a debian live installer image, 64-bit for both. The installations are standard desktops, both xfce with the default configuration and package options.

If you say the app image is running in debian live image, would there be a possible dependency issue here? Something that is included in the live image that isn’t installed by default for a standard/default Debian installation?

@probonopd

Yes, that could be the cause. But I don’t know what.

@itsTheFae

I would be happy to provide just about any information you ask for in order to help figure this out.
I’m way more clueless on this than you are, I think. The error message isn’t the most descriptive and I am not totally sure where or what else to check that would provide helpful information.

If there is a list of dependencies for AppImage, I can check which are/aren’t installed and test which ones might be needed. Could you produce this list of dependencies for me?
If not, could you produce a list of the installed packages on your live image so I can compare those against what is installed in my Debian installations?

@probonopd

What does

./Mudlet-3.3.1-linux-x64.AppImage --appimage-extract

say? Does it extract the files to squashfs-root/?

@itsTheFae

Trying your command line argument, I get the same error as trying to execute it normally.
bash: ./Mudlet-3.3.1-linux-x64.AppImage: cannot execute binary file: Exec format error

@probonopd

Please post the output (first lines) of each of the following:

file ./Mudlet-3.3.1-linux-x64.AppImage
strings ./Mudlet-3.3.1-linux-x64.AppImage | head -n 1
strace -f ./Mudlet-3.3.1-linux-x64.AppImage

@probonopd

@itsTheFae

Thanks for the help, and sorry for the bother.
Turns out the reporter uses only the GUI to extract the image via debian’s «Extract Here» menu entry, which for some reason produces a second file that is a tar file but does not have a tar extension. The file can’t be run because it isn’t the actual AppImage, its a damnable tar file. hahaha.
doh!

@TheAssassin

Well, looks like we can close this issue then.

Next time, call file first, to get an interpretation of the magic number, as well as xxd or hexdump, as that might reveal the less obvious solutions already.

@probonopd

Turns out the reporter uses only the GUI to extract the image via debian’s «Extract Here» menu entry, which for some reason produces a second file that is a tar file but does not have a tar extension. The file can’t be run because it isn’t the actual AppImage, its a damnable tar file. hahaha.

It did the same thing for me, #434 (comment)

Pleeeeease don’t put AppImages into archives like tar files. This is what happens.

The UltiMaker S7 is built on the success of the UltiMaker S5 and its design decisions were heavily based on feedback from customers.

 
 
So what’s new?
The obvious change is the S7’s height. It now includes an integrated Air Manager. This filters the exhaust air of every print and also improves build temperature stability. To further enclose the build chamber the S7 only has one magnetically latched door.

 
The build stack has also been completely redesigned. A PEI-coated flexible steel build plate makes a big difference to productivity. Not only do you not need tools to pop a printed part off. But we also don’t recommend using or adhesion structures for UltiMaker materials (except PC, because…it’s PC). Along with that, 4 pins and 25 magnets make it easy to replace the flex plate perfectly – even with one hand.

 
The re-engineered print head has an inductive sensor which reduces noise when probing the build plate. This effectively makes it much harder to not achieve a perfect first layer, improving overall print success. We also reversed the front fan direction (fewer plastic hairs, less maintenance), made the print core door magnets stronger, and add a sensor that helps avoid flooding.

 

 
The UltiMaker S7 also includes quality of life improvements:
Reliable bed tilt compensation (no more thumbscrews) 2.4 and 5 GHz Wi-Fi A 1080p camera (mounted higher for a better view) Compatibility with 280+ Marketplace materials Compatibility with S5 project files (no reslicing needed) And a whole lot more  
Curious to see the S7 in action?
We’re hosting a free tech demo on February 7.
It will be live and you can ask any questions to our CTO, Miguel Calvo.
Register here for the Webinar

I’m trying to run a program, but it gives an error:

bash: ./program: cannot execute binary file: Exec format error

The result of file program was:

program: ELF-32-bit LSB executable, ARM, EABI4 version 1 (SYSV), dynamically linked (uses share libs), for GNU/LINUX 2.6.16, not stripped

How can I fix this?

I’m using Ubuntu 14.04.2 (amd64) with VMware. I also tried using Ubuntu i386, but the result was the same.

Bas van Paassen's user avatar

asked Jul 15, 2015 at 5:30

Soongeun Hwang's user avatar

Soongeun HwangSoongeun Hwang

1,5012 gold badges9 silver badges4 bronze badges

1

You’re trying to run an executable compiled for an ARM architecture on an x86-64 architecture, which is much like asking your processor who only speaks English to take directions in Chinese.

If you need to run that executable you have two choices:

  1. Get an x86-64 version of the executable (by any mean; if you’re unable to get an x86-64 version of the executable but you’re able to get its source code, you can try to recompile it on the virtual machine);

  2. Install Ubuntu Server for ARM in place of Ubuntu 14.04.2 (amd64). This requires either a physical machine running on an ARM architecture or a virtualization software that can emulate it.

answered Jul 15, 2015 at 5:39

kos's user avatar

1

This can also occur if you attempt to run an x86-64 executable on a 32-bit platform.

In one specific instance, I downloaded Visual Studio Code and tried to run it on my Ubuntu installation, but I hadn’t realized that I had installed 32-bit Ubuntu in this VM. I got this error, but after downloading the 32-bit version, it ran without issue.

answered Sep 10, 2015 at 23:44

Hughie Coles's user avatar

It is often possible to run an ARM executable image on an amd64 system if you install the binfmt-support, qemu, and qemu-user-static packages:

sudo apt install binfmt-support qemu qemu-user-static

qemu will then perform syscall emulation when you run the executable. This works for most ARM binaries but there are a few that may not run correctly.

ArrayBolt3's user avatar

answered Oct 27, 2016 at 6:41

Nathan Osman's user avatar

Nathan OsmanNathan Osman

31.7k40 gold badges176 silver badges259 bronze badges

2

Such error may occur if all of the following are true:

  • Executable is not a file but a link
  • You run run it inside VM
  • File is located in shared folder
  • Your host is Windows.

If you got that file, let’s say, in archive — try to unpack it inside VM, in some directory inside virtual drive, not folder mapped to your host machine hard drive, for example /myNewDir/

wjandrea's user avatar

wjandrea

13.8k4 gold badges46 silver badges95 bronze badges

answered Nov 13, 2015 at 22:22

Pavel's user avatar

PavelPavel

3531 gold badge3 silver badges10 bronze badges

1

If more than one java is installed on the system this might happen and not set as default. On Ubuntu14.04 LTS I could get it resolved by executing following and choosing the java I needed.

sudo update-alternatives --config java
[sudo] password for user: 
update-alternatives: warning: /etc/alternatives/java has been changed (manually or by a script); switching to manual updates only
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1069      manual mode

Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode

I choose 2 and set openjdk-8 as a default. Which did not show the Exec format error.

Videonauth's user avatar

Videonauth

32.6k16 gold badges102 silver badges119 bronze badges

answered Jun 6, 2016 at 13:43

lambzee's user avatar

You must compile your file using an appropriate CPU architecture (x86 for example) and copy the .exe file on your linux machine. Then you can install mono on your linux machine and issue the following command:

mono myprogram.exe

muru's user avatar

muru

189k52 gold badges460 silver badges711 bronze badges

answered Feb 28, 2016 at 19:49

user3578181's user avatar

1

This can also happen if the binary uses a libc implementation which is not libc, such as musl. These days this specific problem is most likely encountered when trying to run a binary with libc in a Docker container with an image based on alpine. There is nothing that can be done to the binary itself to support both environments, because the libc implementation must always be linked statically, i.e. built directly into the binary, for reasons.

answered Jul 16, 2019 at 16:44

Zyl's user avatar

I got this error trying to run a zip file containing an executable rather than extracting it and running the executable itself xD

In addition to the other answers offered here, I suppose there would be a lot of file types that aren’t intended to be executable which could cause this error.

answered May 19, 2020 at 6:05

Alexander Taylor's user avatar

1

This is another special case: WSL (Windows Subsystem for Linux) by default(!) only supports 64bit executables. I think this is a rather unusual behaviour, as normally there is a backwards compatibility.

(Even more special is that selecting 64bit in a formerly 32bit project of Windev won’t fix your issue. You need to start a new project, selecting 64bit right in the beginning. Tested on Windev 26. This IDE sucks, forced to use it because of working legacy code.)

answered Jul 21, 2022 at 23:23

PythoNic's user avatar

PythoNicPythoNic

6761 gold badge5 silver badges15 bronze badges

2

Photo by Jivacore/Shutterstock.com

Linux has been reworked heavily since it first came out to the point that it’s no longer an OS for terminal kings. Just about everyone can use it now thanks to the much better user interfaces that we see in modern Linux distros. However, that doesn’t mean it can’t be frustrating at times. 

In this article, we’re taking a look at the “cannot execute binary file: exec format error” issue and giving you a few solutions on how to get rid of the problem. 

Also read: How to make a file executable in Linux?


Check the architecture

The first thing you should do is ensure you’ve got the right bin file. Binary files made for 32-bit systems won’t work on 64-bit systems and vice-versa. You can check the architecture of any file by using the command below.

file filename

How to fix Cannot execute binary file: exec format error?

If the architecture doesn’t match between your file and the PC you’re running it on, try running the corresponding binary file for the matching architecture. 


Check the file

Binary files can be run on Windows, Linux and macOS. However, binaries made for one OS won’t run on the others. Generally, these files have different file formats to help users distinguish between them. If you’re trying to run a binary file made for Windows on a Linux distro, it’s obviously not going to work. 

If you must run the binary on Linux however, we recommend downloading Wine and using it to run the file. Wine is a compatibility layer capable of running Windows applications on POSIX-compliant operating systems, including Linux and macOS. 


Install GCC and Gfortran

GCC and Gfortran are required for several binary files to compile and execute properly. You can install them by typing the command below in your terminal. 

sudo apt-get install gfortran && sudo apt-get install build-essential

How to fix Cannot execute binary file: exec format error?

Now try running your binary file again and it should run without a problem — fixing the ‘cannot execute binary file’ error.


Uncompress the file

Sometimes binary files are compressed to make them easier to share over the internet. Try uncompressing the file to see if that helps you run it fine. Run the following commands on at a time. 

xz -d ./filename
chmod +x ./filename
./filename

Check file permissions

Another potential reason for your binary file not running could be that the user doesn’t have permission to change or read the file. You can fix this by typing the following command in the terminal. 

chmod +x filename

How to fix Cannot execute binary file: exec format error?

Once the permissions are set, you can run the file by typing this.

./filename

Use Dos2unix

The Dos2unix command can sometimes help binaries made for DOS to run on UNIX systems. Try using the following command to see if your file runs or not. 

dos2unix filename.bin

If we’ve missed out on any fixes that helped you solve the ‘cannot execute binary file’ error, please comment down below with the fix.

Also read: What does ./ mean in Linux?

Yadullah Abidi

Someone who writes/edits/shoots/hosts all things tech and when he’s not, streams himself racing virtual cars.

You can contact him here: [email protected]

Chromebook install error — cannot execute binary file: Exec format error

Mark Gebert

(@mark-gebert)

Active Member

Chromebook install error — cannot execute binary file: Exec format error

I get an error after trying to execute the Prusa Slicer appimage file.  Any ideas on what is going wrong?

[email protected]:~$ chmod a+x PrusaSlicer.AppImage

[email protected]:~$ ./PrusaSlicer.AppImage

-bash: ./PrusaSlicer.AppImage: cannot execute binary file: Exec format error

[email protected]:~$

Log in to be able to post

Posted : 14/10/2022 10:06 pm

jsw

RE: Chromebook install error — cannot execute binary file: Exec format error

My first guess is that you have the incorrect image for your processor.

IIAC, Chromebooks can use either the ARM type processors, or the Intel-derived processors.  You need the correct appimage for the processor.

It could also be a corrupt image file.

Log in to be able to post

Posted : 15/10/2022 2:00 am

JimB

RE: Chromebook install error — cannot execute binary file: Exec format error

I tried it on my chromebook.  Running uname -m showed the architecture to be «aarch64».  So I downloaded the appimage with aarch64 in the name.  The GTK2 one did not work for me (missing library), but the GTK3 one did run.

Log in to be able to post

Posted : 15/10/2022 2:05 pm

jsw

RE: Chromebook install error — cannot execute binary file: Exec format error

That is definitely an ARM type processor, but Chromebooks can be different depending on type.

Posted by: @jimb

I tried it on my chromebook.  Running uname -m showed the architecture to be «aarch64».  So I downloaded the appimage with aarch64 in the name.  The GTK2 one did not work for me (missing library), but the GTK3 one did run.

Log in to be able to post

Posted : 15/10/2022 8:19 pm

Mark Gebert

(@mark-gebert)

Active Member

Topic starter
answered:

RE: Chromebook install error — cannot execute binary file: Exec format error

Changing image files got the slicer working.  The file system cannot directly write to the SD Card and I noticed some file access errors on Linux command line editor so I am may try the third image file in the build.  But all the non-file system features of the Prusa Slicer work without any issues.

Posted by: @jsw

My first guess is that you have the incorrect image for your processor.

IIAC, Chromebooks can use either the ARM type processors, or the Intel-derived processors.  You need the correct appimage for the processor.

It could also be a corrupt image file.

Log in to be able to post

Posted : 06/12/2022 7:53 am

Dear community, I am having trouble installing ImageJ on the Raspberry Pi 4 Model B+ 4GB running on Ubuntu 64. However, a month ago, I have installed ImageJ on Ubuntu on my desktop PC, and it is running fine.
Now I have tried to run ImageJ for Linux on Ubuntu 64 on my Raspberry, and I get the following error.

bash: ./ImageJ: cannot execute binary file: Exec format error

Image

After a bit of googling, I found out that this error is typically related to the OS if it is 64 or 32 Bit, but Ubuntu is 64 Bit, so it should be fine.
I have tried executing with java 8 and 11, but I get the same error in both cases.

Image

I compared the ImageJ folders on my Pi and my PC, and in the folder, on my PC, I have two additional files that I do not have on the Raspberry. So I have marked the files in the picture below.

Image

Just after downloading the ImageJ from the webpage, the folder on my PC has the same files as the one on the Raspberry. So, I have done something so that these two additional files on my PC appear, but unfortunately, I cannot remember what.

I really appreciate any help you can provide.

Best regards,
Georgi

Понравилась статья? Поделить с друзьями:
  • Apphangxprocb1 как исправить
  • Apphangb1 ошибка word
  • Apphangb1 windows 7 как исправить проводник
  • Appfabric installation failed because installer msi returned with error code 1603
  • Appex networks accelerator lwf как исправить