linux下apache+php安装常见问题

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,高可用系列 2核4GB
云数据库 RDS PostgreSQL,高可用系列 2核4GB
简介:
linux下apache+php安装常见问题 
configure: error: Unable to find libgd.(a|so)
如果使用的是ubuntu或debian就很简单了,直接sudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd 就基本上搞定,但是用源代码安装还是很麻烦~
wget  http://www.boutell.com/gd/http/gd-2.0.11.tar.gz 
tar zxvf gd-2.0.11.tar.gz
cd gd-2.0.11
sudo ./configure --prefix=/usr/local/gd2
sudo make
sudo make install
再php:~/:./configure  …… --with-gd=/usr/local/gd2  ……

1) Configure: error: xml2-config not found. Please check your libxml2 installation.
Solutions :
Quote:#yum install libxml2 libxml2-devel (For Redhat & Fedora) 
# aptitude install lib xml2 -dev      (For ubuntu) 
 
2) Checking for pkg-config… /usr/bin/pkg-config
configure: error: Cannot find OpenSSL’s <evp.h>
Solutions :
Quote:#yum install openssl openssl-devel 
3) Configure: error: Please reinstall the BZip2 distribution
Solutions :
Quote:# yum install bzip2 bzip2-devel 
4) Configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
Solutions :
Quote:# yum install curl curl-devel   (For Redhat & Fedora) 
# install libcurl4-gnutls-dev    (For Ubuntu)
 
5) Configure: error: libjpeg.(also) not found.
Solutions :
Quote:# yum install libjpeg libjpeg-devel 
6) Configure: error: libpng.(also) not found.
Solutions :
Quote:# yum install libpng libpng-devel 
7) Configure: error: freetype.h not found.
Solutions :
Quote:#yum install freetype-devel 
8) Configure: error: Unable to locate gmp.h
Solutions :
Quote:# yum install gmp-devel 
9) Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
Solutions :
Quote:# yum install mysql-devel            (For Redhat & Fedora) 
# apt-get install libmysql++-dev      (For Ubuntu)
 
10) Configure: error: Please reinstall the ncurses distribution
Solutions :
Quote:# yum install ncurses ncurses-devel 
11) Checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!
Solutions :
Quote:# yum install unixODBC-devel 
12) Configure: error: Cannot find pspell
Solutions :
Quote:# yum install pspell-devel 
13) configure: error: mcrypt.h not found. Please reinstall libmcrypt.
Solutions :
Quote:# yum install libmcrypt libmcrypt-devel    (For Redhat & Fedora) 
# apt-get install libmcrypt-dev
 
14) Configure: error: snmp.h not found. Check your SNMP installation.
Solutions :
Quote:# yum install net-snmp net-snmp-devel

CentOS 5 常见的configure error的解决方法仅限于CentOS 5
configure: error: No curses/termcap library found 
网上有的说法是:
--with-named-curses-libs=/usr/lib/libncursesw.so.5
其实是不对的,虽然能解决configure的错误,但是make的时候会提示错误,正确的做法应该是
yum -y install ncurses-devel
debian: apt-get install libncurses5-dev
configure: error: xml2-config not found 
yum -y install libxml2-devel
debian:apt-get install libxml2-dev
configure: error: Cannot find OpenSSL's 
yum -y install openssl-devel
configure: error: libjpeg.(a|so) not found 
yum -y install gd
yum -y install gd-devel
debian:apt-get install libjpeg-dev
configure: error: libpng.(a|so) not found. 
apt-get install libpng12-dev
configure: error: cannot find output from lex; giving up 
yum -y install flex
configure: error: mod_deflate has been requested but can not be built due to prerequisite failures 
yum -y install zlib-devel openssl-devel
debian:apt-get install zlib1g-dev
configure: error: libXpm.(a|so) not found. 
apt-get install libxpm-dev
onfigure: error: freetype.h not found. 
apt-get install libfreetype6-dev
configure: error: ...No recognized SSL/TLS toolkit detected 
apt-get install libssl-dev
configure: error: Please reinstall the libcurl distribution - easy.h should be in /include/curl/ 
yum -y install curl-devel 

本文转自holy2009 51CTO博客,原文链接:http://blog.51cto.com/holy2010/360412

相关实践学习
每个IT人都想学的“Web应用上云经典架构”实战
本实验从Web应用上云这个最基本的、最普遍的需求出发,帮助IT从业者们通过“阿里云Web应用上云解决方案”,了解一个企业级Web应用上云的常见架构,了解如何构建一个高可用、可扩展的企业级应用架构。
MySQL数据库入门学习
本课程通过最流行的开源数据库MySQL带你了解数据库的世界。 &nbsp; 相关的阿里云产品:云数据库RDS MySQL 版 阿里云关系型数据库RDS(Relational Database Service)是一种稳定可靠、可弹性伸缩的在线数据库服务,提供容灾、备份、恢复、迁移等方面的全套解决方案,彻底解决数据库运维的烦恼。 了解产品详情:&nbsp;https://www.aliyun.com/product/rds/mysql&nbsp;
相关文章
|
4月前
|
Ubuntu Linux
计算机基础知识:linux系统怎么安装?
在虚拟机软件中创建一个新的虚拟机,并选择相应操作系统类型和硬盘空间大小等参数。将下载的 ISO 镜像文件加载到虚拟机中。启动虚拟机,进入安装界面,并按照步骤进行安装。安装完成后,可以在虚拟机中使用 Linux 系统。
|
2月前
|
安全 Linux iOS开发
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
149 6
Nessus Professional 10.10 Auto Installer for RHEL 10, AlmaLinux 10, Rocky Linux 10 - Nessus 自动化安装程序
|
2月前
|
消息中间件 Kafka Linux
Linux下安装Kafka 3.9.1
本文介绍Kafka 3.9.1版本的安装与配置,包括通过ZooKeeper或KRaft模式启动Kafka。涵盖环境变量设置、日志路径修改、集群UUID生成、存储格式化及服务启停操作,适用于Linux环境下的部署实践。
244 0
|
4月前
|
网络协议 关系型数据库 Linux
【App Service Linux】在Linux App Service中安装 tcpdump 并抓取网络包
在App Service for Linux环境中,无法像Windows一样直接使用网络排查工具抓包。本文介绍了如何通过TCPDUMP在Linux环境下抓取网络包,包括SSH进入容器、安装tcpdump、执行抓包命令及下载分析文件的完整操作步骤。
203 5
|
4月前
|
弹性计算 安全 Linux
阿里云服务器ECS安装宝塔Linux面板、安装网站(新手图文教程)
本教程详解如何在阿里云服务器上安装宝塔Linux面板,涵盖ECS服务器手动安装步骤,包括系统准备、远程连接、安装命令执行、端口开放及LNMP环境部署,手把手引导用户快速搭建网站环境。
|
4月前
|
Ubuntu 安全 Linux
Linux这5款微型发行版,体积小+精简,比win7运行还快,值得安装
以上5款微型发行版体积小且精简,如果你有台旧电脑,不妨试试?
|
4月前
|
安全 Ubuntu Linux
如何安装Linux操作系统?
此时,您可以选择重新启动计算机,然后从硬盘上的Linux系统启动。以上是一个大致的安装过程。请注意,不同的Linux发行版可能会在细节上有所差异,因此在进行安装之前,请确保您阅读并理解了相应发行版的安装指南或文档。
|
4月前
|
Ubuntu Linux 数据安全/隐私保护
Win10安装Linux子系统教程!如何在Win10系统中安装Ubuntu!
登录系统后,输入cd /返回上一级,然后再输入“ls”查看一下系统文件目录,看看对不对!
|
4月前
|
Ubuntu Linux Shell
手把手教你安装适用于Linux的Windows子系统——Ubuntu
重启完成,你看看重新打开Ubuntu是不是发生了变化,等待几分钟,系统配置完成,根据提示设置用户名和密码即可