I am developing an application on Beaglebone board with Angstrom distrubition fo Linux.I faced an interesting problem.
When I execute :
sh /home/root/Desktop/BBTCP/out/vehicleDetect 192.168.10.29
in terminal it says
/home/root/Desktop/BBTCP/out/vehicleDetect: /home/root/Desktop/BBTCP/out/vehicleDetect: cannot execute binary file
But when i execute
cd /home/root/Desktop/BBTCP/
and
sh out/vehicleDetect 192.168.10.29
it starts working??
What is the reason and why I can’t run tha application with first configuration?
I think it is about the difference between ./ and sh. What are the differences?
My first guess would be that one of the folders in the path
/home/root/Desktop/BBTCPis a link. IfvehicleDetectis a script and it invokes itself recursively, then this link might be confusing it.If that’s not the case, try
sh -x /home/root/Desktop/BBTCP/out/vehicleDetectand see what that prints.Lastly, check what’s in the folder
/home/root/Desktop/BBTCP. There might be an executableshin there. If your path contains., a different shell might be executed.