Jump to content

  • Log In with Google      Sign In   
  • Create Account

Getting "File Not Found" when Executing Binary


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Vincent_M   Members   -  Reputation: 638

Like
0Likes
Like

Posted 17 February 2014 - 06:51 PM

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?



Sponsor:

#2 ApochPiQ   Moderators   -  Reputation: 15698

Like
0Likes
Like

Posted 17 February 2014 - 07:37 PM

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



#3 Vincent_M   Members   -  Reputation: 638

Like
0Likes
Like

Posted 17 February 2014 - 07:41 PM

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.



#4 GolanTrevize   Members   -  Reputation: 138

Like
1Likes
Like

Posted 17 February 2014 - 10:26 PM

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.



#5 Vincent_M   Members   -  Reputation: 638

Like
0Likes
Like

Posted 18 February 2014 - 12:24 AM

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!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS