menu

Questions & Answers

My busybox does not execute non-applet utility commands

I installed the latest busybox to my new embedded project. It runs OK until I try to put dropbear in my application. The busybox shell complains that dropbear is not found although "which dropbear" command gives me the correct answer "/sbin/dropbear". If I change its mode to RW, it complains that dropbear is not executable. I have tried other non-bosybox commands and it complains the same. It must be a setup issue. Can anyone help me out? Thank you very much.

Allan

Answers(2) :

Perhaps you're missing the necessary libraries? Some environments don't print helpful messages when this happens. Check what libraries it wants to link against.

ldd or objdump -x <file> |grep NEEDED are helpful.

You probably want to do this from your build machine, as it sounds like the embedded shell environment is pretty broken.

Comments:
2023-01-24 23:52:06
Thank you Eric. I will try it out and let you know. I tried a small program like: #include <stdio.h> int main(int argc, int **argv) { printf("My Test\n"); return 0; } compiled with: pcc_4xxFP-gcc -o mytest test.c I tftped it to my box. I got the same.
2023-01-24 23:52:06
Hello, Eric, it is shared library issue. Thank you.

Eric Seppanen's answer is true,any missing dynamic library dependency will cause the cryptic "not found" message for the binary in question. Linux will also give this error if it cannot find ld-linux-x86-64.so.2 in the /lib64 directory, or for 32bit binaries, the corresponding 32bit ld-linux*.so in /lib.