64-bit Linux does not run 32-bit programs, problem solving solution __linux

Source: Internet
Author: User
The origin of the problem

Cross-compilation is very important (should be said to be necessary) for embedded development, but the recent use of cross-compilation tools on physical Linux machines has often encountered a problem: the cross-compile tool version is correct, the installation steps are correct, and the environment variable is set correctly, but it is running ARM-LINU-GCC- V has been reported bash:/OPT/ARM-2009Q3/BIN/ARM-LINUX-GCC: No error in the file or directory, is very depressing, Google finally found the cause of the problem: My Linux is 64-bit, but the cross-compilation tool is 32-bit, Therefore, it cannot be run.
Viewing ARM-NONE-LINUX-GNUEABI-GCC with the file command will appear with the following information.

Arm-none-linux-gnueabi-gcc:elf 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, Interpreter/lib /ld-linux.so.2, for Gnu/linux 2.2.5, stripped

And my operating system uname-a.

Linux kevin-tp 4.4.0-36-generic #55-ubuntu SMP Thu Aug all 18:01:55 UTC 2016 x86_64 x86_64 x86_64 gnu/linux
Solution

1, the compilation of their own system for the cross-compilation tool, feel too troublesome, and then give up.
2, looking for 64-bit cross-compilation tools, because my cross-compilation tool is the Development Board manufacturers to provide, many demos are compiled by it, if their own replacement if the error is difficult to determine the intersection of the compiler tool problem or code problems, the higher risk, give up.
3, reinstall 32-bit Linux, because the author needs to compile the Android source code, compiled all know, hard disk space at least 40G, memory to 16g+, and 32-bit system can only manage 4G of memory space, if reinstalled 32 Linux will make the notebook performance greatly discounted, also gave up.
4, the last way is to install the 32-bit program runtime on a 64-bit machine, which is most appropriate because the 64-bit CPU is compatible with the 32-bit instruction set. installing 32-bit runtime libraries

The Ubuntu (Debain series) Linux can be installed in the following ways. (Note that the front command prompt is ' # ' That means I'm running with root and I need sudo if I don't want to run with root)
# Dpkg–add-architecture i386
#apt Install libc6:i386 test

After the installation is complete, rerun the Arm-linux-gcc-v
That Long-lost big Tuo version information appears, OK, problem solving. PostScript

This problem often encountered, and often forget, the friends around me under the instigation of the book to Linux also often encountered this problem, so write a blog memo, but also encountered the same problems with the same colleagues to share.

The solution for installing the 32-bit runtime references the http://www.voidcn.com/blog/zoomdy/article/p-6152388.html attached link, thanks and respect.

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.