标签:linux
前提是:nginx和mysql服务启动
[root@web01 mysql]# netstat -lntup|egrep "nginx|mysql"
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2742/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2931/nginx
安装环境:
[root@web01 mysql]# cat /etc/redhat-release CentOS release 6.8 (Final) [root@web01 mysql]# uname -r 2.6.32-642.el6.x86_64 [root@web01 mysql]# uname -m x86_64
检查有没有安装两个库:
rpm -qa freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel
rpm -qa zlib-devel libxm12-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel
[root@web01 mysql]# rpm -qa freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel [root@web01 mysql]# rpm -qa zlib-devel libxm12-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel zlib-devel-1.2.3-29.el6.x86_64 [root@web01 mysql]#
提示:libjpeg-turbo-devel是早期的libjpeg-devel的新名字,libcurl-devel是早期的curl-devel的新名字。
每个lib一般都会存在对应的以“*-devel”命名的包安装对应的“-devel”包后,对应的lib包会自动安装好,例如安装gd-devel就会安装gd。
这些lib库也不是必须安装的,但是目前的企业环境下一般都需要安装。否则,PHP程序运行有问题,例如验证码无法显示等。
执行下面命令安装相关的LIB软件包:
[root@web01 mysql]# yum install zlib-devel libxm12-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel -y [root@web01 mysql]# yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel -y
检查是否yum安装成功
[root@web01 mysql]# rpm -qa freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel gd-devel-2.0.35-11.el6.x86_64 freetype-devel-2.3.11-17.el6.x86_64 libpng-devel-1.2.49-2.el6_7.x86_64 libxslt-devel-1.1.26-2.el6_3.1.x86_64 libcurl-devel-7.19.7-53.el6_9.x86_64 [root@web01 mysql]# rpm -qa zlib-devel libxm12-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel libjpeg-turbo-devel-1.2.1-3.el6_5.x86_64 zlib-devel-1.2.3-29.el6.x86_64
发现有两个包没有安装成功:No package libxm12-devel available.和No package libiconv-devel available.
[root@web01 mysql]# yum install zlib-devel libxm12-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel -y Failed to set locale, defaulting to C Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com Package zlib-devel-1.2.3-29.el6.x86_64 already installed and latest version No package libxm12-devel available. Package libjpeg-turbo-devel-1.2.1-3.el6_5.x86_64 already installed and latest version Package libjpeg-turbo-devel-1.2.1-3.el6_5.x86_64 already installed and latest version No package libiconv-devel available. Nothing to do
从以上结果看出,仅有libiconv-devel这个包满意安装,因为默认的yum源没有此包,后面会编译安装。
当然也可以一个一个的yum安装或通过源文件手工编译安装,这个方法太麻烦,毕竟效率优先。
安装yum无法安装的libiconv库。
本文出自 “sandshell” 博客,请务必保留此出处http://sandshell.blog.51cto.com/9055959/1958843
标签:linux
原文地址:http://sandshell.blog.51cto.com/9055959/1958843