Article Title: linux running program error. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Symptom: Linux is installed on the local machine, and 32-bit apache is running;
Error message: No such file or directory
Solution: First, check whether the binary program is unix/linux:
File filename: httpd: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped
It can be seen that this program is a 32-bit executable linux program;
Step 2 check the operating system version: uname-a: Linux ubuntu 2.6.35-22-generic # 33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 2010 x86_64 GNU/Linux
It can be seen that the installed kernel is a 64-bit linux;
So we can find that the 32-bit executable program cannot run on the 64-bit kernel, but I can only run the 32-bit program on the 64-bit kernel, some 32-bit dynamic libraries are missing. So google, found that it is the lack of ia32-libs this package; so apt-get install ia32-lib to install this package;
Problem solving;
Summary: we know that an executable binary program has a magic number in the file header. For example, all linux c programs have the ELF magic number. Now, when loading executable programs in linux, attackers can dynamically execute programs based on different magic numbers, including java, ruby, python, awk, go, and other language executors;
Similarly, sometimes when we run a program, we will report a lack of Dynamic Link Libraries. First, we can know the missing library by using odd filename;