1

I'm using a fairly cut down version of Linux, which doesn't have Bash. It does however, have Ash. I'm not sure what exactly the differences are, but it seemed like it might be relevant.

Normally I can execute a binary file by simply entering something like /usr/bin/rx to run the program rx. And in that case, I can.

However, the complement program to rx, called sx, is also on this Linux system, and I'd like to use that as well. When I call rx, it works fine, but when I try to do the same for sx, I get

-/bin/ash: /usr/bin/sx: not found

However, sx is present in /usr/bin/. There is a difference between the two programs, the one that works is a part of busybox, while the other seems to just be an additional program. Doing an ls -l showed the permissions as being:

-rwxr-xr-x

so I don't think the problem is that I need to chmod it. Why can't I run this program?

  • 1
  • That does seem like a good possibility(In fact, considering how sparse this system is, it seems quite likely). However, I don't have 'ldd' or 'file' on my system. Is there an alternative way to get that information? – Zephyr Mar 21 '17 at 19:36
  • @Zephyr Did you read the answer to that Q, or just the Q? – Run CMD Mar 21 '17 at 19:45
  • @ClassStacker the answer to that question linked to another question, the answer of which said "ldd and readelf -l will be able to show the ELF interpreter your executable is requesting." However, I don't seem to have ldd on the system I am having problems with. So my followup question was if there was some other way of determining the dependencies. – Zephyr Mar 21 '17 at 19:49
  • Copy the file in question to a different system that has readelf, use it there to determine path of interpreter. In a pinch, you could even use strings, hexdump etc. -- anything that looks vaguely similar to /lib/ld-linux.so is probably the interpreter. – dirkt Mar 21 '17 at 20:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.