./configure: error: the HTTP rewrite module requires the PCRE library
sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev
./configure: error: the HTTP gzip module requires the zlib library.
sudo apt-get install zlib1g-dev
./configure: error: the HTTP XSLT module requires the libxml2/libxslt libraries
sudo apt-get install libxml2 libxml2-dev libxslt-dev
./configure: error:the HTTP image filter module requires the GD library.
sudo apt-get install libgd-dev libgd2-xpm-dev
./configure: error: the GeoIP module requires the GeoIP library.
sudo apt-get install geoip-database libgeoip-dev
./configure: error: C compiler cc is not found
sudo apt install build-essential
#如果安装失败切换阿里源
vim /etc/apt/sources.list
#然后写入如下,即可设置阿里源 以下只适合20.04
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
#在执行如下即可安装
sudo apt-get update
# 文件内容如下
1.gcc_4%3a9.3.0-1ubuntu2_amd64.deb
2.libgd-dev_2.2.5-5.2ubuntu2.1_amd64.deb
3.libpcre3_2%3a8.39-12ubuntu0.1_amd64.deb
4.libpcre3-dev_2%3a8.39-12ubuntu0.1_amd64.deb
5.libssl-dev_1.1.1f-1ubuntu2.19_amd64.deb
6.libx11-6_2%3a1.6.9-2ubuntu1.2_amd64.deb
7.libxml2-dev_2.9.10+dfsg-5ubuntu0.20.04.6_amd64.deb
8.libxpm-dev_1%3a3.5.12-1ubuntu0.20.04.1_amd64.deb
9.libxslt1-dev_1.1.34-4ubuntu0.20.04.1_amd64.deb
10.libxt-dev_1%3a1.1.5-1_amd64.deb
11.openssl_1.1.1f-1ubuntu2.19_amd64.deb
12.zlib1g_1%3a1.2.11.dfsg-2ubuntu1.5_amd64.deb