C development environment under Linux setup process
– install glibc
Some software may require that your system’s Glibc be higher than a certain version to work, and if your Glibc is lower than the required version, you will have to upgrade your Glibc in order to run the software. Such as:
Error while loading Shared Libraries: Requires glibc 2.5 or later Dynamic Linker
You can look for compiled RPM packages or use source code to upgrade Glibc.
RPM package glibc
RPM is relatively easy to install, but the dependency problem is difficult to solve. Give a download address:
http://mirrors.jtlnet.com/centos/5.5/os/i386/CentOS/
$ RPM – the ivh glibc 2.5-49.. I386 RPM b>
But I’m using CentOS 4.8 and it doesn’t seem to be compatible…
error: Failed dependencies:
Glibc-common = 2.5-49 is needed by glibC-2.5-49. I386
glibc > 2.3.4 conflicts with glibc – common – 2.3.4-2.43 el4_8. 3. The i386
After the installation is complete, you can check whether you have upgraded:
$ ls -l /lib/libc.so.6
lrwxrwxrwx 1 root root 11 10-08 22:08 /lib/libc.so.6 -> Libc – 2.5. So
compile and install glibc
Download the glibc
[root@localhost test]# pwd
/test
[root @ localhost test] # wget http://ftp.gnu.org/gnu/glibc/glibc-2.9.tar.bz2 b>
Download the glibc – linuxthreads
[root @ localhost test] # wget http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-2.5.tar.bz2 b>
Unpack the
[root-@localhost test]# tar-jvxf glibc-2.9.tar.bz2
[root @ localhost test] # CD glibc 2.9 b>
[root-@localhost glibc-2.9]# tar-jvxf../glibc – linuxthreads – 2.5. Tar..bz2 b>
configuration
[root @ localhost glibc 2.9] # CD..
[root@localhost test]# exportCFLAGS=”-g -O2 -march=i486″
[root@localhost test]# mkdir glibc-build
[root@localhost test]# cd glibc-build
[root@localhost glibc-build]# .. /glibc-2.9/configure –prefix=/usr –disable-profile — enabling -add-ons –with-headers=/usr/include –with-binutils=/usr/bin
The installation
[root@localhost glibc-build]# make
[root@localhost glibc-build]# make install
Three points should be paid attention to during installation and compilation:
1. To unzip glibC-LinuxThreads into glibc directory.
2. Cannot run configure in glibc’s current directory.
Otherwise, if there is an error: error “Glibc cannot be Compiled without optimization”, please add the optimization switch: [root-@localhost test]# export CFLAGS=” -g-O2-March =i486″
Reproduced in: https://blog.51cto.com/rockhooray/787500
Read More:
- [gdb] error while loading shared libraries: libcunit.so.1: cannot open shared object file
- error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file o
- Solve the software startup error while loading shared libraries: libgd. So. 2: cannot open shared object error
- nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open
- error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file
- error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file
- /usr/sbin/zabbix_agentd: error while loading shared libraries: libcurl.so.4
- goldendict: error while loading shared libraries: libQt5Svg.so.5
- /usr/lib/deepin-wine/wine: error while loading shared libraries: libwine.so.1
- Xcode: error: linker command failed with exit code 1(use -v to see invocation) or libstdc++.6.0 is missing
- JavaScript / JS native dynamic introduction of external CSS files and dynamic insertion of CSS code fragments
- Docker load loading mirror message JSON no such file or directory error
- AE ram preview requires 2 or more frameworks to solve playback
- ImportError: libcudnn.so.7: cannot open shared object file: No such file or directory
- Free dynamic screen capture drawing tool under MAC: KAP
- Xcode ffmpeg Error:/clang:1:1: linker command failed with exit code 1 (use -v to see invocation)
- Importerror of [docker] error: libGL.so .1: cannot open shared object file: No such file or directory
- matplotlib 1.3.1 requires nose, which is not installed. matplotlib 1.3.1 requires tornado, which is
- OSError: libnccl.so.2: cannot open shared object file: No such file or directory
- Running trust error reporting linker ‘link. Exe’ not found on Windows