Advertisement Jump to content
Sign in to follow this  
Vincent_M

Getting "File Not Found" when Executing Binary

This topic is 1796 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!