ubuntu 下编译安装 mysql php nginx 及常见错误 (持续添加)

本文详细介绍如何通过MySQL官方APT源安装MySQL,并提供了一系列在Ubuntu上安装PHP所需库的方法,包括freetype的编译安装过程及解决常见编译错误方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

mysql 

mysql 可以使用mysql 官方提供的apt源进行安装 参见这里

php 安装前先安装一些常见库

sudo apt-get install libpng16-16 libpng16-dev libiconv-hook1 libiconv-hook-dev libjpeg9 libjpeg9-dev libjpeg9-dbg libgd3 bzip2 harfbuzz

安装 freetype

freetype 没有找到apt-get 方式的安装办法, 只能编译安装

下载freetype  , 然后解压, 进入 freetype 文件夹

 ./configure --prefix=/usr/local/freetype
 sudo make
 sudo make install

php编译安装时常见错误

Q: configure: error: Please reinstall the BZip2 distribution

A: sudo apt-get install libbz2-dev bzip2

------------------------------------------------------------------------------

Q: ubuntu configure: error: Please reinstall the libcurl distribution

A: sudo apt-get install libcurl4-gnutls-dev curl

------------------------------------------------------------------------------

Q: configure: error: Cannot find OpenSSL's <evp.h>

A: sudo apt-get install libssl-dev 

------------------------------------------------------------------------------

Q: configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.

A: sudo apt-get install libsnmp-dev  libperl-dev

------------------------------------------------------------------------------

Q: 待续...

nginx

nginx 编译过程中遇到的错误汇总

Q:  ./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option

A: sudo apt-get install libpcre3 libpcre3-dev 

转载于:https://www.cnblogs.com/debmzhang/p/5860572.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值