Fixed the problem of bad elf interpreter.

Source: Internet
Author: User

The newly installed 64-bit FC 17 program has some problems when running the 32-bit program. The most direct error is:

/Lib/ld-linux.so.2: bad elf Interpreter: no such file or directory

I found the article on the Internet. The solution is to use Yum to install the 32-bit glibc library, and my environment Yum cannot work. Let alone this method.

There is exactly 32-bit FC 12 at hand, so consider the most direct method: copy the file from FC 12 if the file is missing.

Finally, 3 files are copied to/lib to solve this problem. They are:

Ld-2.11.so

Libc-2.11.so

Libm-2.11.so

Create three soft links:

Lrwxrwxrwx. 1 Root 12 June 19 14:12 libm. so.6-> libm-2.11.so
Lrwxrwxrwx. 1 Root 12 June 19 13:57 libc. so.6-> libc-2.11.so
Lrwxrwxrwx. 1 Root 10 June 19 13:55 ld-linux.so.2-> ld-2.11.so

After the above steps, the 32-bit cross-compilation environment can compile our source code normally.

Due to time, I still don't know the feasible principle. I will try again in my spare time.

------- 12/12/25 --------

Supplement: Later, we found that three so files must have the execution permission. Otherwise, the 32-bit program reports the "no permission" error during running.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.