Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Debian unable to execute binary files

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
VentGrey
Posts: 171
Joined: 2016-04-26 23:57
Location: Guanajuato México

[SOLVED] Debian unable to execute binary files

#1 Post by VentGrey »

This is an issue I've been dealing with for 3 months now and I have found no solution, I had my Debian stretch install for 4 months but I don't know if it was after an update or so that Debian is doing very weird things, first of all wine32 & playonlinux don't work at all like steam, (idk what the i386 packaging team is doing that is messing up everything).

But now the problem seems a little odd, at first I thought I broke the system but now I think it is a direct problem from Debian, I liked some lutris games but I didn't want to add the repo so I downloaded the source packages for the games, I tried redeclipse, simutrains and other games but when I tried to execute them I always got the "no such file or directory" error, I downloaded the game am2r and the same problem exists, to prove my point i've taken some screenshots:

https://pasteboard.co/GPZ6395.png

and trying to execute it manually (directly from dir)
https://pasteboard.co/GPZ6pZr.png

If a few more details are needed, yes, the files DO have the correct permissions, in one occasion I did the chmod 777 & the chown things, but they did not work, I'm using Debian 9.2 but right now I havent found any log errors or so, Is my 5th install this week broken? or is Debian having some "internal" problems?

Edit:
Solution: Run the

Code: Select all

file <filename>
command where you have your program & check for the architecture, in this case the output was:

Code: Select all

am2r: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=18ff50b7dc4a1abd6653dda0dd5f720e91ad7593, stripped
If the executable does not come with a dependencies text file you can run the

Code: Select all

objdump -x <file_name>
and search for the "NEEDED" section to see on what libraries does your program depend :mrgreen:
Last edited by VentGrey on 2017-10-23 13:59, edited 1 time in total.
I would exchange everything I know in exchange for half of what I don't.

User avatar
roseway
Posts: 1528
Joined: 2007-12-31 22:50
Location: Kent, UK
Has thanked: 3 times
Been thanked: 4 times

Re: Debian unable to execute binary files

#2 Post by roseway »

This isn't a Debian problem, it's a user problem. If you try and launch a program from the command line, it will only work if the executable is in your PATH. Otherwise you have to type the complete path to the executable. If you want to launch it from the directory where the executable is, you have to put './' in front of the executable name, e.g.:

Code: Select all

./myprogram
If you build the program from source, you need to make sure that the executable is marked as executable. Using chmod 777.. doesn't help. What you need to do is

Code: Select all

chmod +x <path to executable>
Eric

User avatar
VentGrey
Posts: 171
Joined: 2016-04-26 23:57
Location: Guanajuato México

Re: Debian unable to execute binary files

#3 Post by VentGrey »

Check the second image, it's what I did, about the chmod +x command, it didn't work. :( problem is still there.
I would exchange everything I know in exchange for half of what I don't.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Debian unable to execute binary files

#4 Post by stevepusser »

Please copy and paste your commands and outbox in a code box here instead of just providing links to bulky screenshots. You can also get them to come out in English (with this one simple trick! Learn how!)

I also see a big fat README file in that directory (one thing a screenshot's good for). What's in there?

You should also have some tools installed by default which can provide information about any file, such as "file".

Code: Select all

file <filename>
MX Linux packager and developer

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Debian unable to execute binary files

#5 Post by GarryRicketson »

If the OP is trying to run this game/program using wine,?
-- first of all wine32 & playonlinux don't work at all like steam,
This will not work,

Code: Select all

./myprogram 
There is some info about "wine" on Debian, :
https://wiki.debian.org/Wine
Also I see this :
https://askubuntu.com/questions/86529/h ... mmand-line
All though it is Ubuntu, it confirmed my thoughts ( I do not use wine,and was not sure)
From the ubuntu link:
You just have to

Code: Select all

wine /path/to/your/exe/program.exe
For example, for me, the same applies to programs , or games I run in DosBox,...

Code: Select all

$ pacman.EXE
ksh: pacman.EXE: cannot execute - Permission denied
$ ./pacman.EXE
ksh: ./pacman.EXE: cannot execute - Permission denied
Oh no, my pacman game does not work, What do I do ?

Code: Select all

$ pwd
/home/garry/pacman
$ ls -g pacman.EXE
-rw-r--r--  1 garry  220648 Jan  3  1997 pacman.EXE
 
Here I use pwd, to make sure I am in the correct dir.
'ls -g' to see the permissions , it is not +x and does not need to be.

Code: Select all

$ dosbox pacman.EXE
DOSBox version 0.74
Copyright 2002-2010 DOSBox Team, published under GNU GPL.
---
CONFIG:Loading primary settings from config file /home/garry/.dosbox/dosbox-0.74.conf
MIXER:Got different values from SDL: freq 44100, blocksize 882
MIDI:Opened device:sndio
$ 
I start it with :

Code: Select all

 dosbox pacman.EXE 
and it loads and starts the game, in DosBox,.

To start it from my home dir:

Code: Select all

$ dosbox /home/garry/pacman/pacman.EXE
DOSBox version 0.74
Copyright 2002-2010 DOSBox Team, published under GNU GPL.
---snip-- 
It starts just fine,...
Note: Since your game is 'am2r' use the name exactly like it is,.. IE:

Code: Select all

wine /path/to/your/gamefolder/am2r 

And see if it starts.


User avatar
VentGrey
Posts: 171
Joined: 2016-04-26 23:57
Location: Guanajuato México

Re: Debian unable to execute binary files

#7 Post by VentGrey »

@stevepusser
I also see a big fat README file in that directory (one thing a screenshot's good for). What's in there?
It has some windows instructions tho, that is the linux version, the dependencies text also mention it

Code: Select all

32 bit dependencies on Ubuntu/Debian based systems are:
libgcc1:i386 libgl1-mesa-glx:i386 libglu1-mesa:i386 libopenal1:i386 libssl1.0.0:i386
libstdc++6:i386 libx11-6:i386 libxext6:i386 libxrandr2:i386 libxxf86vm1:i386 zlib1g:i386

On a 32 bit distribution you may only need the following as the rest should/will
be installed by default anyway: libglu1-mesa libopenal1 libssl1.0.0 libxxf86vm1
I do have some of those libs installed (except the libssl1.0.0) but what's weird it's that it worked perfectly in previous stretch installs, I can bet anything to it.


@Wizard10000
Does the file actually exist in the directory? I see from second screenshot that you're in a directory that has the same name as its parent.
The file does exist, I even renamed the folder "just in case" but no sucess in doing so.

@GarryRicketson
If the OP is trying to run this game/program using wine,?
No, the game is a Linux native, Wine problem was what made me notice this error :mrgreen:

@Head_on_a_Stick
I DO have enabled my i386 architecture in dpkg, about the ubuntu forum post I think the
ia32-libs
they mention are these

Code: Select all

 libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
I'm going to try your advice because as Steve said up there the

Code: Select all

file
command did throw a 32 bit binary there :mrgreen:
I would exchange everything I know in exchange for half of what I don't.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Debian unable to execute binary files

#8 Post by GarryRicketson »

@GarryRicketson

If the OP is trying to run this game/program using wine,?

No, the game is a Linux native, Wine problem was what made me notice this error :mrgreen:
Oops, sorry, everything I found in my searches indicated this is a game that needs to be run on windows, or with wine, and what you say here:
Post by VentGrey » 2017-10-21 10:29
This is an issue I've been dealing with for 3 months now and I have found no solution, I had my Debian stretch install for 4 months but I don't know if it was after an update or so that Debian is doing very weird things, first of all wine32 & playonlinux don't work at all like steam, (idk what the i386 packaging team is doing that is messing up everything).
Made me think "Wine" is involved.
Could you show us where you got this linux version, ? Is it open source ?
I have to run, have chores to do, and don't have time to explain, but you mention:
I didn't want to add the repo so I downloaded the source packages for the games, I tried redeclipse, simutrains and other games but when I tried to execute them I always got the "no such file or directory" error, I downloaded the game am2r and the same problem exists,
Was it working on your previous Debian version, ? My guess is you need to compile it again, but for the newer Debian version,...there just are not enough details to say much. In a nut shell, I had a similar thing happen, years ago with some games I wrote myself, and compiled on "knoppix", later when I started using Linux mint, they did not work, I had to re-compile for linux mint, the same, when I switched to Ubuntu, and the same when I switched to Debian,... And before I re-compiled them, I would get "file not found", even though the executable was there.
I noticed in one search result, someone has produced this game or a clone,
using "game maker", which is a game engine of sorts, but for windows, and they claim they got it working on Ubuntu, but after all said and done, if this game was made using something like "game maker", you may have a lot of problems getting it to work on Debian, and more so on Stretch then some of the older versions.
I do have some of those libs installed (except the libssl1.0.0) but what's weird it's that it worked perfectly in previous stretch installs, I can bet anything to it.
"Some of" is not all of them, and even 1 little library file missing can cause all sorts of problems, including a "file not found" error.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Debian unable to execute binary files

#9 Post by stevepusser »

You can also run

Code: Select all

objdump -x <file_name>
to see what libraries and minimum versions thereof are required.
MX Linux packager and developer

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Debian unable to execute binary files

#10 Post by debiman »

looking at op's previous threads, i do suspect some sort of architecture mismatch problems.

ventgrey, you need to show us terminal output.
"ls -al" instead of a screenshot, the "file" and "objdump" commands mentioned etc.

User avatar
VentGrey
Posts: 171
Joined: 2016-04-26 23:57
Location: Guanajuato México

Re: Debian unable to execute binary files

#11 Post by VentGrey »

ventgrey, you need to show us terminal output.
"ls -al" instead of a screenshot, the "file" and "objdump" commands mentioned etc.

Code: Select all

Vent@Debian:~/Escritorio/am2r-1.1-linux$ ls -al
total 3592
drwxrwxr-x 4 vent vent    4096 sep  9  2016 .
drwxr-xr-x 3 vent vent    4096 oct 23 09:08 ..
-rwxrwxr-x 1 vent vent 3650228 nov 22  2014 am2r
drwxr-xr-x 3 vent vent    4096 ago 16  2016 assets
-rw-rw-r-- 1 vent vent     564 ago 14  2016 dependencies.txt
drwxrwxr-x 2 vent vent    4096 oct 23 09:08 icons
-rw-rw-r-- 1 vent vent    2679 ago 16  2016 README
You can also run

Code: Select all

objdump -x <file_name>

Code: Select all

  NEEDED               libstdc++.so.6
  NEEDED               libz.so.1
  NEEDED               libXxf86vm.so.1
  NEEDED               libGL.so.1
  NEEDED               libopenal.so.1
  NEEDED               libm.so.6
  NEEDED               librt.so.1
  NEEDED               libXext.so.6
  NEEDED               libX11.so.6
  NEEDED               libXrandr.so.2
  NEEDED               libGLU.so.1
  NEEDED               libssl.so.1.0.0
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6
  NEEDED               libpthread.so.0
  NEEDED               libdl.so.2
  NEEDED               libcrypto.so.1.0.0
Aha! now I assume I need the "i386" versions of those required libs, everything fine but I'm stuck here

Code: Select all

 libssl.so.1.0.0: cannot open shared object file: No such file or directory
, as far as I know Debian uses version 1.0.2 & 1.1, I've googled a bit and found a tip that said:
Make a symlink to your libssl version (and hope everything works), or install the specific libssl version. You have to make sure that only AM2R uses it, because this can make your system insecure / break applications. You can use "ldd ./am2r" to find out which libraries AM2R wants to use. If you set up libssl.so.1.0.0 correctly, ldd should show the path to this libssl library.
should the symlink be in the game folder & be pointing to the i386 version of libssl1.0.2? (Maybe that's for another thread)

As for the problem about the "unreadable" files it has been fixed with the previous advices from @Head_on_a_Stick & @stevepusser, what seems weird to me is that now I need to install these manually when they worked out of the box before, my theory is that some 32-bit libs are being worked on and somehow do not install but, nothing that cannot be fixed by hand, Thanks to everyone who commented on this issue :mrgreen:
I would exchange everything I know in exchange for half of what I don't.

Post Reply