Hi,
I am working on a customized version of CentOS 5.8 x86_64 (basically a minimal install with a handful of plugins and applications). Although it suffers from a serious lack of documentation I need to use this particular machine to run some tests. To add to that I am restricted to SSH for access.
The problem is that trying to run anything in the /lib/ or /usr/lib/ directories results in the error: "cannot execute binary file"
I saw it first when running an installer that depended on several 32-bit libraries. I can provide more details on the installation attempt if needed. The reason I need 32-bit binaries to run is that the installer itself is a binary whose instructions I cannot change. Here's the full dependency list (queried with ldd on a CentOS 5.8 system with functioning 32-bit libraries):
Code:
linux-gate.so.1 => (0xffffe000)
libdl.so.2 => /lib/libdl.so.2 (0x00c5e000)
librt.so.1 => /lib/librt.so.1 (0x00c65000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00c42000)
libc.so.6 => /lib/libc.so.6 (0x00ae5000)
/lib/ld-linux.so.2 (0x00ac6000)
# ls -l /lib/ld-linux.so.2
lrwxrwxrwx 1 root root 9 Nov 20 17:45 /lib/ld-linux.so.2 -> ld-2.5.so
Potentially useful information:
Code:
# uname -a
Linux xxx 2.6.36-1.xx x86_64 x86_64 x86_64 GNU/Linux
# /lib/ld-2.5.so
-bash: /lib/ld-2.5.so: cannot execute binary file
# file /lib/ld-2.5.so
/lib/ld-2.5.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), from 'tart', not stripped
# ldd /lib/ld-2.5.so
/usr/bin/ldd: line 161: /lib/ld-linux.so.2: cannot execute binary file
not a dynamic executable
After some extensive Google hiking I narrowed it down to a 32-bit emulation support issue. Sure enough, the source had been compiled without 32-bit emulation.
I recompiled it like this:
Code:
# cd /usr/src/linux
# make menuconfig
In the menu, under Executable file formats/Emulations I ticked IA32 Emulation and IA32 a.out support (with *, not M). Then
Code:
# make && make modules
# make module_install && make
Then a reboot, but it didn't solve the problem (is there anything important I missed here?)
I then removed packages compat-libstdc++, compat-glibc and libgcc, and glibc-2.5-42.i686 with yum remove, rebooted and then:
Code:
# yum reinstall glibc
Running Transaction
Erasing : glibc 1/4
Installing : glibc 1/4
error: %post(glibc-2.5-81.el5_8.7.i686) scriptlet failed, exit status 255
Erasing : glibc 2/4
Installing : glibc 2/4
Removed:
glibc.i686 0:2.5-81.el5_8.7
glibc.x86_64 0:2.5-81.el5_8.7
Installed:
glibc.i686 0:2.5-81.el5_8.7
glibc.x86_64 0:2.5-81.el5_8.7
I found a scriplet failed error reported here:
http://help.lockergnome.com/linux/RP...ict377592.html
and suggestions to disable SELinux, but it is already disabled.
I also used yum to install the packages compat-glibc, compat-libstdc++-296, compat-libstdc++-33 and glibc-devel as suggested on forums (
https://bbs.archlinux.org/viewtopic.php?id=145568,
http://www.linuxquestions.org/questi...378/page2.html)
as well as
Code:
# yum groupinstall "Legacy Software Support"
as suggested here:
http://serverfault.com/questions/289...t-applications
adding compat-libgcc-296 and compat-libstdc++-296
Here's a list of the packages installed after the recompile:
Code:
compat-glibc-2.3.4-2.26
compat-glibc-headers-2.3.4-2.26
compat-glibc-2.3.4-2.26
compat-libgcc-296-2.96-138
compat-libstdc++-296-2.96-138
compat-libstdc++-33-3.2.3-61
compat-libstdc++-33-3.2.3-61
glibc-common-2.5-81.el5_8.7
glibc-devel-2.5-81.el5_8.7
glibc-devel-2.5-81.el5_8.7
glibc-2.5-81.el5_8.7
glibc-2.5-81.el5_8.7
glibc-headers-2.5-81.el5_8.7
I also tried
as suggested here:
http://www.linuxquestions.org/questi...-linux-386030/
Am I headed in the right direction here?
Are there any other settings/packages I can look for with regards to 32-bit binaries on CentOS 64-bit?