Search code examples
linuxubuntudebianscpwindows-subsystem-for-linux

"no such file or directory" after using SCP


I am using WSL Ubuntu-Bionic on my laptop and copied a file to a beaglebone (Debian-Stretch). Somehow it is shown by ls -l when I ssh onto the beagle, but if I try to run it, I get an error:

scp test debian@134.147.152.133:~/crosstest
ssh debian@134.147.152.133
ls -l 
-rwxr-xr-x 1 debian debian 8936 Jan  8 09:50 crosstest
./crosstest
-bash: ./crosstest: No such file or directory

Solution

  • After searching around a bit, I found a solution:

    As Romeo wrote, this had to have something todo with the file itself. I recompiled the file using arm-linux-gnueabihf-g++ instead of arm-linux-gnueabi-g++.

    I found this after reading this SO post