前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >在Linux系统中安装LAMP出现的错误总结

在Linux系统中安装LAMP出现的错误总结

作者头像
星哥玩云
发布2022-06-28 17:13:11
3.2K0
发布2022-06-28 17:13:11
举报
文章被收录于专栏:开源部署

总结一下用源代码安装LAMP环境中遇到常见的错误,从错误3开始是因为安装php后面带参数,导到没有找到开发包例如:./configure --with-gd  --with-libjpeg会出现如下错误。

1.checking for termcap functions library... configure: error: No curses/termcap library found       解决方法:yum install ncurses      --缺少ncurses安装包

2.1)安装gd库出现以下错误:     In file included from /root/php-5.3.6/ext/gd/libgd/gd_compat.c:8:     /usr/local/jpeg/include/jpeglib.h:938: error: expected declaration specifiers or ‘...’ before ‘FILE’     /usr/local/jpeg/include/jpeglib.h:939: error: expected declaration specifiers or ‘...’ before ‘FILE’     make: *** [ext/gd/libgd/gd_compat.lo] Error 1

          解决方法:vim  php-5.3.6/ext/gd/libgd/gd_compat.c                         #include <png.h>    --修改为#include </usr/local/libpng/include/png.h>                         #include <stdio.h>  --添加这行

3. Configure: error: xml2-config not found. Please check your libxml2 installation.

Solutions :

解决方法:yum install libxml2 libxml2-devel

4. Configure: error: Please reinstall the BZip2 distribution

Solutions :

解决方法:yum install bzip2 bzip2-devel

5. Configure: error: libjpeg.(also) not found.

Solutions :

解决方法:yum install libjpeg libjpeg-devel

6.Configure: error: libpng.(also) not found.

Solutions :

解决方法:yum install libpng libpng-devel

7.Configure: error: Cannot find MySQL header files under /usr.

Note that the MySQL client library is not bundled anymore!

Solutions:

解决方法:yum install mysql-devel

8.没有安装snmp开发包 checking for SNMP support... yes checking OpenSSL dir for SNMP... no checking whether to enable UCD SNMP hack... no checking for net-snmp-config... (cached) /usr/bin/net-snmp-config configure: error: snmp.h not found. Check your SNMP installation. [root@RedHat1 php-5.2.17]#

解决方法:yum install net-snmp net-snmp-devel

9.apache端口被占用了 [root@redhat1 bin]# ./httpd (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs [root@redhat1 bin]#

解决方法:80端口被占用了,杀掉占用80端口的进程 

10.没有指定主机IP地址 [root@redhat1 bin]# ./httpd httpd: Could not reliably determine the server's fully qualified domain name, using 2.2.2.117 for ServerName [root@redhat1 bin]#

解决方法:vim /usr/local/apache/conf/httpd.conf

ServerName localhost          --添加这一行就可以了

10.访问网站时出现下载页面

解决方法:vim /usr/local/apache/conf/httpd.conf    --加载php模块

LoadModule php5_module        modules/libphp5.so

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云数据库 MySQL
腾讯云数据库 MySQL(TencentDB for MySQL)为用户提供安全可靠,性能卓越、易于维护的企业级云数据库服务。其具备6大企业级特性,包括企业级定制内核、企业级高可用、企业级高可靠、企业级安全、企业级扩展以及企业级智能运维。通过使用腾讯云数据库 MySQL,可实现分钟级别的数据库部署、弹性扩展以及全自动化的运维管理,不仅经济实惠,而且稳定可靠,易于运维。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档