LNMP分别代表Linux、Nginx、MySQL、PHP,以下问题是在centos7中发现的问题
问题:
- Centos 7 安装 nginx安装,提示:c compiler cc is not found
执行:yum -y install gcc-c++
- 使用yum安装时显示yum进程被Packagekit占用的问题
执行:vim /etc/yum/pluginconf.d/langpacks.conf
然后将第一行的enable=1改为enable=0
然后重启即可
- 安装nginx时候提示:./configure: error: the HTTP rewrite module requires the PCRE library.
执行:yum -y install pcre-devel
执行:yum -y install openssl openssl-devel
- gzip: stdin: unexpected end of file
- tar: 归档文件中异常的 EOF
- tar: 归档文件中异常的 EOF
- tar: Error is not recoverable: exiting now
原因:centos中的文件是从windows拖拽进去的,文件不完整
解决:将文件复制到centos中
- Error when getting information for file “//tmp/VMwareDnD/zGuL5W/mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz”: No such file or directory
解决:CentOS安装VMwareTools
- 编译libiconv时显示:In file included from progname.c:26:0:./stdio.h:1010:1: 错误:‘gets’未声明(不在函数内)
解决:打开libiconv-1.14/srclib/stdio.in.h文件
将698行的代码:_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
替换为:
#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif
- 配置configure信息时显示:configure: error: xml2-config not found. Please check your libxml2 installation.
解决:
重新安装libxml2和libxml2-devel包
yum install libxml2
yum install libxml2-devel -y
- error: Please reinstall the libcurl distribution -easy.h should be in <curl-dir>/include/curl/
解决:curl的dev包没有安装:yum -y install curl-devel
- error: jpeglib.h not found.
--解决:
yum -y install libjpeg-devel
rpm -ql libjpeg-turbo
- error: png.h not found.
yum install libpng
yum install libpng-devel
- error:freetype.h not found.
yum install freetype-devel
- error:mcrypt.h not found.
yum install -y epel-release
yum install -y libmcrypt-devel
- error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
yum install libxslt-devel* -y
- [alert] kill(3368, 1) failed (3: No such process)
解决:把nginx服务关掉在启动就行
- bash: 未预期的符号 `newline' 附近有语法错误
解决:PHP代码出错了,修改正确即可