CentOS5.5 搭建LAMP常见问题总结
 
在安装libmcrypt的时候报出了个经典的gcc错误,
checking whether make sets $(MAKE)… (cached) yes
checking for g++… no
checking for c++… no
checking for gpp… no
checking for aCC… no
checking for CC… no
checking for cxx… no
checking for cc++… no
checking for cl… no
checking for FCC… no
checking for KCC… no
checking for RCC… no
checking for xlC_r… no
checking for xlC… no
checking for C++ compiler default output file name… configure: error: C++ compiler cannot create executables
显然是gcc的问题
我自己装centos的时候没有自带gcc,只是后来用了yum install gcc
结果报上面的经典错误。。。
于是网上找啊。。。找出来了。。。
4 :编译前准备
安装编译器gcc
1. 最小化安装,没有安装编译器
yum install gcc
2. gcc-c++
如果不安装,在编译mysql的时候会出现【exec: g++: not found】错误
yum install gcc-c++
这句话必须
另:
安装PHP出现错误:
编译出现的错误如下:
Running FastCGI Process Manager checks
checking for php-fpm config file path… $prefix/etc/php-fpm.conf
checking for php-fpm log file path… $prefix/logs/php-fpm.log
checking for php-fpm pid file path… $prefix/logs/php-fpm.pid
checking for XML configuration
checking for xml2-config… no
checking for xml-config… no
configure: error: XML configuration could not be found
解决办法:
yum -y install libxml2 libxml2-devel
其他缺少的:
php-5.2.9]$ sudo yum install mcrypt libmcrypt mhash libmhash libxml2-devel openssl-devel bzip2-devel curl-devel libjpeg-devel libpng-devel gmp-devel mysql-devel aspell-devel zlib zlib-devel
具体错误类型:
configure: error: xml2-config not found. Please check your libxml2 installation.
yum install libxml2-devel
configure: error: Cannot find OpenSSL’s
yum install openssl-devel
configure: error: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/
yum install curl-devel
configure: error: libjpeg.(a|so) not found
yum install libjpeg-devel
configure: error: libpng.(a|so) not found.
yum install libpng-devel
configure: error: libXpm.(a|so) not found.
yum install libXpm-devel
configure: error: freetype.h not found.
yum install freetype-devel
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
yum install libc-client-devel
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
yum install libmcrypt-devel
configure: error: Please reinstall libmhash – I cannot find mhash.h
yum install mhash-devel
configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
yum install mysql-devel
configure: error: Please reinstall ming distribution. libming.(a|so) not found
- temp remove the config for ‘–with-ming=/opt/ming/’
configure: error: Cannot find pspell
yum install pspell-devel
configure: error: cannot find mm library
Download from http://www.ossp.org/pkg/lib/mm/
wget ftp://ftp.ossp.org/pkg/lib/mm/mm-1.4.2.tar.gz
Extract it: tar -zxvf mm-1.4.2.tar.gz
./configure
make
make install
configure: error: Cannot find libtidy
yum install libtidy-devel
yum install libtidy
change path at configure: ‘–with-tidy=/usr’
configure: error: not found. Please reinstall the expat distribution.
yum install expat-devel
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
yum install libxslt-devel
*Tips: To uninstall, just enter:
yum remove {package-name}
configure: error: Cannot find ldap.h
2010-04-09 admin
Leave a comment Go to comments
configure: error: Cannot find ldap.h :
yum install openldap
yum install openldap-devel
其他
linux上安装有些东西时会出现 Permission denied 的情况:以下就是解决它的办法之一
编辑/etc/selinux/config,找到这段:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=enforcing
把 SELINUX=enforcing 注释掉:#SELINUX=enforcing ,然后新加一行为:
SELINUX=disabled
保存,关闭。
如果你碰到其他类似提示:
cannot restore segment prot after reloc: Permission denied
哪应该是SELinux的问题,可以考虑把它关闭。
————————————————————————————-
郁闷的是.我把SELinux关闭后还是不行.于是到google上search.发现这个很有用.
在你保证SElinux 被disable后.还执行下
chcon -t texrel_shlib_t
如: chcon -t texrel_shlib_t /路径/路径/名字.so (这个文件视具体执行文件.)
以上两步.已经解决了很多server的问题了.
another app is currently holding the yum lock;waiting for it to exit…..
有时用yum升级一些文件时,会出现以下情况:
another app is currently holding the yum lock;waiting for it to exit…
可以通过强制关掉yum进程:
#rm -f /var/run/yum.pid
然后就可以使用yum了。
 
快乐学习,快乐分享!http://kevin.kvm.la/2011/12/14/12.html