2

I connected Emacs to a virtual machine via Eshell, using Tramp. I tried to execute a binary file at the current directory, but Eshell cannot see that file, even though it is right there. The output returned is like this:

/ssh:hwswi:/home/auser/course-materials/lab0 $ ./arrays
./arrays: command not found

For binaries within $PATH, Eshell has no problem.

Edit: if I execute it like this, then Eshell executes fine.

/ssh:hwswi:/home/auser/course-materials/lab0/arrays

Amumu
  • 17,924
  • 31
  • 84
  • 131
  • How about just typing `arrays` -- **without** `./` in front of it? From the error message, it appears that for some reason, it thinks you want to call a program **named** `./arrays` -- i.e., it doesn't recognize `./` as being a special way of launching an executable in the working directory. – lawlist Jul 05 '14 at 16:26
  • @lawlist the result is still "command not found". If I use Dired, I can execute fine. I guess I have to use Dired for remote file system. – Amumu Jul 05 '14 at 16:46

1 Answers1

1
  • have execute bits of array been set? if no, set them, or run the appropriate interpreter and load array with it.
  • does she she-bang line of array reference an actually existing interpreter? if not, fix she-bang
  • if array is a binary executable, not a script, make sure it has been compiled for the proper architecture. the file utility is helpful for this.
  • try to specify full path, instead of assuming that executable resides in current directory
Deleted User
  • 2,551
  • 1
  • 11
  • 18
  • The binary runs file in the virtual machine, but I cannot run it in eshell prompt, at that exact directory. It's a binary executable, not a shell script. – Amumu Jul 05 '14 at 14:45
  • i have added another item to my answer – Deleted User Jul 05 '14 at 15:06
  • But my Eshell prompt is actually inside the directory that contains the executable. If I was in my local machine, it would execute file. Probably I should file a bug report. – Amumu Jul 05 '14 at 15:07
  • try to symlink the executable into a directory in PATH – Deleted User Jul 05 '14 at 15:10