1. yum groupinstall 'Development tools'
2. yum install -y geoip-devel libcurl-devel libxml2-devel libxslt-devel libgb-devel lmdb-devel openssl-devel pcre-devel perl-ExtUtils-Embed yajl-devel zlib-devel
3. cd /opt
4. git clone --depth 1 -b v3/master https://github.com/SpiderLabs/ModSecurity.git
5. cd ModSecurity
6. git submodule init
7. git submodule update
8. ./build.sh
9. ./configure
下面是结果
我们可以看出,第 2 步我们已经安装了 yajl-devel 和 geoip-devel,但是为什么没有找到依赖项?
更新:
当我尝试单独安装时,发现geoip-devel
两者yajl-devel
都报错“无可用包”。想知道我该如何安装它们?
以下是输出
[root@ip nginx]# yum install -y geoip-devel
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
No package geoip-devel available.
Error: Nothing to do
答案1
您缺少的软件包位于 RHEL 可选频道中,您需要启用它。
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional