--此篇博文记录自己学习Linux及Linux工作中遇到的各种故障及问题的汇总
一、CentOS6.5中安装Mysql后在建立mysql库时并初始化时出现错误提示:
Installing MySQL system tables...
./bin/mysqld: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
解决方案:
经网上查询,用yum安装compat-libstdc++-33.x86_64包后重新初始化即可解决。
二、CentOS6.5中安装PHP,在编译时出现错误提示:
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
解决方案:
经分析是由于缺少libxml2-devel.i686组件导致,用yum安装libxml2-devel.i686包后重新编译即可。
三、CentOS6.5中安装PHP,在编译时出现错误提示:
checking whether libxml build works... no
configure: error: build test failed. Please check the config.log for details.
解决方案:
yum erase zlib-devel
yum install -y zlib-devel
yum install -y libxml2-devel
四、CentOS6.5中安装PHP,在编译时出现错误提示:
configure:error: Cannot find OpenSSL's <evp.h>
解决方案:
yum install -y openssl-devel
五、CentOS6.5中安装PHP,在编译时出现错误提示:
checking for BZip2 in default path... not found
configure: error: Please reinstall the BZip2 distribution
解决方案:
yum install -y bzip2-devel
六、CentOS6.5中安装PHP,在编译时出现错误提示:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决方案:
下载扩展rpm包:http://pan.baidu.com/s/1c00cQ2k
rpm -ivh epel-release-6-7.noarch.rpm
yum install -y libmcrypt-devel
七、CentOS6.5中安装PHP扩展模块memcache时/usr/local/php/bin/phpize生成config配置文件出现错误提示:
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
解决方案:
yum install -y autoconf
八、CentOS6.5中用scp命令从其他系统中拷贝文件时出现错误提示:ssh: connect to host 188.188.7.41 port 22: Connection refused
解决方案:
安装完openssh-clents及openssh-server后用检查iptables中SSH端口是什么,用scp -P SSH端口号 [email protected]:/tmp/1.txt ./2.txt ---指定SSH端口号为2222并将远程192.168.0.22的root帐户服务器的/tmp/1.txt文件拷贝到本机当前目录的2.txt
九、CentOS6.5中安装LNMP的PHP时出现错误提示:
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
解决方案:
yum install -y libcurl-devel
十、CentOS6.5中安装LNMP的PHP时出现错误提示:
configure: error: jpeglib.h not found.
解决方案:
yum install -y libjpeg-devel
十一、CentOS6.5中安装LNMP的PHP时出现错误提示:
configure: error: png.h not found.
解决方案:
yum install -y libpng-devel
十二、CentOS6.5中安装LNMP的PHP时出现错误提示:
configure: error: freetype.h not found.
解决方案:
yum install -y freetype-devel
十三、CentOS6.5中安装LNMP的PHP时出现错误提示:
configure: error: libXpm.(a|so) not found.
解决方案:
yum install -y libXpm-devel
十四、CentOS6.5中安装LNMP的PHP时进行make步骤提示错误:/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
解决方案:
yum install -y libtool-ltdl-devel
十五、CentOS6.5中安装LNMP环境的Nginx时在编译步骤提示错误:
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found
解决方案:
yum install -y pcre-devel
十六、CentOS6.5中使用yum工具安装软件包提示错误:
http://mirrors.163.com/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
http://mirror.centos.org/centos/6/addons/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
解决方案:
添加sohu源
vim CentOS-Media.repo
把enabled=1改成enabled=0
然后再修改:你所有采用的源,例如我采用的是sohu 的,就修改sohu的:
vim CentOS-Base-sohu.repo
在[addons] 下面添加:
enabled=0
然后,再执行yum makecache
十七、CentOS6.5中使用yum工具安装ipvsadm提示错误:GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
解决方案:
rpm --import /etc/pki/rpm-gpg/RPM*
十八、CentOS6.5中安装memcache后启动memcache时提示错误: error while loading shared libraries: libevent-2.0.so.5
解决方案:
ln -s /usr/lib/libevent-2.0.so.5 /lib64/libevent-2.0.so.5
十九、CentOS6.5中编译安装PHP时出现报错:
checking for specified location of the MySQL UNIX socket... no
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
解决方案:
cp -rp /usr/lib64/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so
二十、CentOS6.5中安装Mysql后无法用root帐户远程连接到数据库
解决方案:
调整好iptables后使用GRANT ALL PRIVILEGES ON *.* TO '账号'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;开启root帐户远程连接数据库即可
二十一、CentOS6.5中TOMCAT出现内存溢出无法启动TOMCAT(调整TOMCAT默认内存大小)
解决方案:
编辑tomcat安装目录下的bin/catalina.sh文件在cygwin=false一行前加入JAVA_OPTS="-server -Xms800m -Xmx800m -XX:PermSize=256m -XX:MaxPermSize=512m -XX:MaxNewSize=512m"(内存大小可自行设定)
二十二、CentOS6.5中安装vsftpd服务后登陆测试提示530 Login incorrect
解决方案:
vim /etc/pam.d/vsftpd将文件中的/lib内容修改为/lib64,重启vsftpd服务即可
二十三、CentOS6.5中对免编译二进制mysql包进行初始化时提示:bad ELF interpreter: No such file or directory
解决方案:
yum install -y mesa-libGL.i686安装后重新初始化即可
以后会陆续更新自己在linux道路上所遇到的各种问题......