yum install gcc
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package gcc.x86_64 0:4.1.2-42.el5 set to be updated
--> Running transaction check
--> Processing Dependency: libgomp = 4.1.2-42.el5 for package: gcc
--> Processing Dependency: cpp = 4.1.2-42.el5 for package: gcc
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
--> Processing Dependency: libgomp.so.1()(64bit) for package: gcc
--> Processing Dependency: libgcc >= 4.1.2-42.el5 for package: gcc
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package cpp.x86_64 0:4.1.2-42.el5 set to be updated
---> Package libgomp.x86_64 0:4.1.2-42.el5 set to be updated
---> Package glibc-devel.x86_64 0:2.5-24.el5_2.2 set to be updated
---> Package libgcc.x86_64 0:4.1.2-42.el5 set to be updated
--> Running transaction check
--> Processing Dependency: glibc-headers for package: glibc-devel
--> Processing Dependency: glibc = 2.5-24.el5_2.2 for package: glibc-devel
--> Processing Dependency: glibc-headers = 2.5-24.el5_2.2 for package: glibc-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package glibc.x86_64 0:2.5-24.el5_2.2 set to be updated
---> Package glibc-headers.x86_64 0:2.5-24.el5_2.2 set to be updated
--> Running transaction check
--> Processing Dependency: glibc-common = 2.5-24.el5_2.2 for package: glibc
--> Processing Dependency: kernel-headers for package: glibc-headers
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package glibc-common.x86_64 0:2.5-24.el5_2.2 set to be updated
---> Package kernel-headers.x86_64 0:2.6.18-92.1.22.el5 set to be updated
--> Running transaction check
--> Processing Dependency: glibc-common = 2.5-18 for package: glibc
Error: No Package Matching glibc.i686
出现Error: No Package Matching glibc.i686的问题解决办法
yum install glibc glibc.i386 --enablerepo=c532*
再yum install gcc
就OK了
c++,g++
yum install gcc-c++
web env
mysql
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/www/servers/mysql --enable-assembler --with-mysqld-ldflags=-all-static --enable-thread-safe-client --with-extra-charsets=gb2312,gbk,utf8,latin1 --with-named-curses-libs=/usr/lib/libncursesw.so.5
err
/usr/lib/libncursesw.so.5: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/home/r00t/mysql-5.0.77/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/r00t/mysql-5.0.77'
make: *** [all] Error 2
change
--with-named-curses-libs=/usr/lib64/libncursesw.so.5
php
./configure --prefix=/www/servers/php --with-apxs2=/www/servers/httpd20/bin/apxs --with-mysql=/www/servers/mysql --with-iconv --enable-mbstring --enable-ftp --with-libxml2-dir=/usr
err
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
yum install libxml2-devel
err
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... no
configure: error: build test failed. Please check the config.log for details.
ftp://xmlsoft.org/libxml2/
ftp://xmlsoft.org/libxml2/libxml2-2.7.3.tar.gz
tar zxvf
./configure --prefix=/usr/local/libxml2
make
collect2: ld returned 1 exit status
make[2]: *** [xmllint] Error 1
make[2]: Leaving directory `/home/r00t/php-5.2.9/libxml2-2.7.3'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/r00t/php-5.2.9/libxml2-2.7.3'
make: *** [all] Error 2
在configure 加上 --without-zlib 可以编译通过
++
--with-libxml2-dir=/usr/local/libxml2
----------------------------------------------------------------
usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC/usr/local/lib/libz.a: could not read symbols: Bad value解决方法如下:
cd zlib-1.2.3 //进入zlib目录
CFLAGS="-O3 -fPIC" ./configure //使用64位元的方法进行编译
make
make installmake clean
错误提示:
/usr/bin/ld: /usr/local/lib/libjpeg.a(jcapimin.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
进入Jpeg目录
CFLAGS="-O3 -fPIC" ./configure
make
make install-lib
在Linux-x86_64环境下编译php5
LDFLAGS="-L/usr/lib64 -L/lib64" ./configure --prefix=/