Getting "File Not Found" when Executing Binary

Started by
3 comments, last by Vincent_M 10 years, 2 months ago

I have a test VM of Debian on my development computer where I write, develop and test my code, and then I have a production computer with Debian also installed where I run my "production" builds. The production computer doesn't have any development tools on it, so I just FTP my built OpenGL game over to the production computer over my network. I'll try running the program, and I'll get a "not permitted" error because the permissions are incorrect. I'll change the permissions to grant all access to my prod computer's user, and then I'll get this error saying that the file I'm trying to run isn't found. I'll display all of my files in my terminal to make sure I'm in the correct directory, and it'll list the file too. I've tried this with just a basic program that prints "Hello World" to the screen too, and I'll run into the "file not found" error.

If I send the source over, and build it directly on the production computer, it works just fine. Does anyone know what could be happening? I've done some research, and it looks like something could be happening with ELF files?

Advertisement

Are you FTPing in binary or plain-text mode? Copying an executable in default FTP settings will corrupt it.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

I'm just sending the binary over with whatever the default settings are with FileZilla. I could try sending it over via USB when I'm home. Would I be better off zipping the file if I choose to send it through an FTP? The reason I ask is because I'll be sending all kinds of files over FTP: executables, images, models, etc.

I've hit this issue last month and it had one of two causes. Actually just one cause, but in two different cases.

1. Built a 32 bit binary on one machine and tried to run it on another that didn't have 32 bit shared libraries.

2. Built a 64 bit binary that expected shared libs under /lib64 but I tried to run it on a machine that had the 64-bit libraries under /lib

So you can try running ldd -r <binary>. This will check for dependencies. If any are missing, provide them and you should be all set.

I tried running ldd on my binary, but it told me it's not a dynamic executable. Is that an architecture check again libraries? The good news is that I think I found the issue. I'm currently building these binaries in a VirtualBox VM, and trying to execute them on a native install. So, when I ran uname -m, it revealed that my VirtualBox VM's architecture is i686 while my Intel NUC's reported architecture is x86_64. So, what I believe I should do is build this on a native Debian installation. I do have a computer I'm rebuilding that I intended on putting Ubuntu on with a Debian VM to serve as my development VM, but maybe I should just stick with Debian all the way. I like the Gnome and KDE desktops, and it definitely have the power for those.

I'll try a native build, and go from there!

This topic is closed to new replies.

Advertisement