器量大者,福泽必厚
全部博文(587)
分类: LINUX
2010-04-02 10:32:30
2:mysql安装configure时出错:
信息如下:
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for termcap functions library... configure: error: No curses/termcap library found
原因:缺少ncurses-devel安装包
3:mysql安装时提示:exec: g++: not found
原因:缺少gcc-c++-*.i386.rpm
解决方法:到光盘中找到相应版本的rpm包安装即可
4:httpd安装时configure时出错
checking for zlib location... not found
checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures
原因:缺少zlib-devel
解决方法:安装zlib-devel即可
httpd: Syntax error on line 105 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied
原因:开启了selinux
解决方法:禁用selinux(需要重启)或setenforce 0
6:pureftpd安装时出错,configure时出错信息如下:
checking whether mysql clients can run... no
configure: error: Your MySQL client libraries aren't properly installed
vi /etc/ld.so.conf在其中加入:
/usr/local/mysql5/lib/mysql
执行ldconfig即可
7:can not find /usr/local/bin/expect
解决方法:安装expect包
[root@*** liuxiaojie]# rpm -ivh expect-5.43.0-5.1.i386.rpm
[root@*** liuxiaojie]# rpm -ivh expect-devel-5.43.0-5.1.i386.rpm
由于默认在/usr/bin/expect下,只好做个软连接了。
cd /usr/local
ln -s /usr/bin/expect expect 问题即可解决!
gd-2.0.35]# make
cd . && /bin/sh /home/xliu/151/gd-2.0.35/config/missing --run aclocal-1.9 -I config
aclocal:configure.ac:64: warning: macro `AM_ICONV' not found in library
cd . && /bin/sh /home/xliu/151/gd-2.0.35/config/missing --run automake-1.9 --foreign
cd . && /bin/sh /home/xliu/151/gd-2.0.35/config/missing --run autoconf
configure.ac:64: error: possibly undefined macro: AM_ICONV
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
make: *** [configure] Error 1
原因:确实gettext-devel软件包!
9:.安装Jpeg
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure --enable-shared
make
make test
make install
注意,这里configure一定要带--enable-shared参数,不然,不会生成共享库
10:checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
configure: error: libjpeg.(a|so) not found.
解决方法:
[root@qht03 php-5.2.4]# yum -y install libjpeg-devel
11:configure: error: libpng.(a|so) not found.
[root@qht03 php-5.2.4]# rpm -qa | grep libpng ##发现没有安装devel包
libpng-1.2.10-7.1.el5_0.1
解决方法:
[root@qht03 php-5.2.4]# yum -y install libpng-devel
12:configure: error: freetype.h not found.
[root@qht03 php-5.2.4]# rpm -qa | grep freetype
freetype-2.2.1-20.el5_2 ##尽管已经安装freetype ,但还需要安装freetype-devel包!
解决方法:
[root@qht03 php-5.2.4]#yum -y install freetype-devel
13:configure: error: could not find gperf
checking for gperf... no
configure: error: could not find gperf
[root@localhost gearmand-1.1.8]# yum -y install gperf
14:checking test for a working libevent... no
checking test for a working libevent... no
configure: error: Unable to find libevent
[root@localhost gearmand-1.1.8]# yum -y install libevent-devel
应用中的问题:
1: 时不显示,但httpd服务在157上已经开启。
原因:防火墙的缘故
解决方法:关闭防火墙,service iptables stop 或开发80端口
2:已经安装php, 并且在httpd.conf中有php的相关模块,
LoadModule php5_module modules/libphp5.so
但运行时php程序时不能解析php,
解决方法:
在httpd.conf中的
AddType application/x-httpd-php .php .php3
即可解析
查看mysql编译参数:
cat /usr/local/mysql/bin/mysqlbug | grep CONFIGURE_LINE
查看apache编译参数:
cat $apachehome$/build/config.nice
查看php编译参数:
$PHP$/bin/php -i | grep configure
4:安装php
4.1:安装zlib,./configure --prefix=/usr/local/zlib ;make;make install
4.2:安装jpeg时出问题,提示找不到
install: /usr/local/jpeg/bin/cjpeg: No such file or directory
根据提示创建目录即可(bin、lib、man\man1,include)
mke install 即可
4.3:安装libxml, ./configure –prefix=/usr/local/libxml;make;make install即可
4.5:安装freetype
qht25# ./configure --prefix=/usr/local/freetype
GNU make (>= 3.79.1) or makepp (>= 1.19) is required to build FreeType2.
Please try
`GNUMAKE=
or >&2
`GNUMAKE="makepp --norc-substitution" ./configure'.
没有安装gmake,安装即可
显然是make的版本太低!
升级make的版本,我下载的是make-3.81.tar.bz2,
tar jxvf make-3.81.tar.bz2
cd make-3.81
./configure
make
make install
默认会按照在/usr/local/bin目录下:
qht25# pwd
/usr/local/bin
qht25# ls make
make
先查看使用的是何种shell
setenv PATH /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
设置环境变量(这种方式会在机器重启后丢失!)
还有一种永久生效的方式:
vi ~/.cshrc
中默认
set path = ( /sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
应修改为:
set path = (/usr/local/bin /sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin)
然后重启机器,即可使得设置的环境变量永久生效
###修改shell:(先查看echo $SHELL ,chsh -s /bin/csh )
4.6:安装linpng,
cd libpng-1.4.3
./configure --prefix=/usr/local/libpng
make
make install
4.7:gzip 安装
/usr/bin/install -c gzip /usr/local/gzip/bin/gzip
install: /usr/local/gzip/bin/gzip: No such file or directory
make: *** [installbin] Error 71
安装时出错!
解决方法:
mkdir -p /usr/local/gzip/bin
cd gzip-1.2.4
./configure --prefix=/usr/local/gzip
make
make install时出错
执行以下命令后:mkdir -p /usr/local/gzip/bin即可
4.8:安装curl
tar zxvf curl-7.17.0.tar.gz ##这个版本太低,在编译php时会出错(但configure可以过去),需要curl-7.17.1的版本
cd curl-7.17.0
./configure --prefix=/usr/local/curl
make
make install
4.9:
tar jxvf gd-2.0.35.tar.bz2
cd gd-2.0.35
./configure --prefix=/usr/local/gd2/ --with-png=/usr/local/libpng --with-freetype=/usr/local/freetype --with-jpeg=/usr/local/jpeg --without-xpm
make
make install
4.10:mysql安装
tar -zxf mysql-5.0.45.tar.gz && cd mysql-5.0.45
./configure --prefix=/usr/local/mysql5 \
--enable-assembler \
--with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static \
--enable-thread-safe-client \
--with-charset=gbk
make && make install && cd ..
安装php时失败,如下:
解决方法:安装perl
方法:
cd perl-5.12.1
./configure.gnu
make
make test
make install
默认会安装在/usr/local/bin目录下(因为我已经将/usr/local/bin放到$PATH中)
但编译php时,问题还是出现,
解决方法:删除原来的httpd2.2(开始我先安装了httpd2.2,尽管后来已经安装了perl,但还是会出现上面的附件出现的问题),然后重新编译一遍即可!
在编译php时出错如下:
checking for xml2-config path... /usr/local/libxml/bin/xml2-config
configure: error: libxml2 version 2.6.11 or greater required.
原因:libxml版本太低。
我装的是 libxml2-2.6.3,删除,重新安装即可
还有开始我使用的是curl-7.17.0,结果在编译php时出错(configure可以过去),换成curl-7.17.1.tar.gz安装即可解决此问题