Compile mod_jk appears aclocal-1.15: command not found error

1. Operating environment

(1) Experimental environment

  • Native OS: Windows 10 Pro
  • Virtual machine version: Vmware12

(2) System environment

  • Operating system version in the virtual machine: CentOS Linux release 7.4.1708 (Core) -x86_64
  • Operating system kernel version in the virtual machine: Linux 3.10.0-693.el7.x86_64

(3) Software environment

  • tomcat-connectors-1.2.48-src

2. Problem description

# 进入 native 目录下进行编译和安装 mod_jk
/usr/local/tomcat-connectors-1.2.48-src/native/configure --with-apxs=/usr/bin/apxs && make && make install
  • The following error occurs when executing the previous command

line 81: aclocal-1.15: command not found
WARNING: 'aclocal-1.15' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
make: *** [Makefile:579: aclocal.m4] Error 127
-e  error code=2! 

3. Reason Analysis

  • Error interpretation:

line 81: aclocal-1.15: command not found

WARNING: 'aclocal-1.15' is missing on your system.

It is only required if the m4 files included in "acinclude.m4" or "configure.ac" or "configure/ac" have been modified.

The "aclocal" program is part of the GNU Automake package:

<http://www.gnu.org/software/automake>It also requires GNU Autoconf, GNU m4 and Perl to run: <http://www.gnu.org/software/autoconf> <http://www. gnu.org/software/m4/> <http://www.perl.org/>

make: *** [Makefile:579:aclocal.m4] Error 127

-e error code=2 !

  • Analysis: lack of aclocal or aclocal version is too low

4. Solutions

  • Install a newer version of aclocal and then recompile and install mod_jk
# 首先获取来源
wget https://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz

# 解压文件
tar -xzvf automake-1.15.tar.gz

# 构建并安装
cd automake-1.15
./configure --prefix=/opt/aclocal-1.15
make
sudo mkdir -p /opt
sudo make install

# 添加环境变量
export PATH=/opt/aclocal-1.15/bin:$PATH
aclocal --version

# 重新进入 native 目录下进行编译和安装 mod_jk
/usr/local/tomcat-connectors-1.2.48-src/native/configure --with-apxs=/usr/bin/apxs && make && make install

Guess you like

Origin blog.csdn.net/qq_42535298/article/details/129300617