在MAC平台编译安装遇到的问题

在Unix/Linux平台编译源代码安装软件遇到的问题

Changzheng-Hes-MacBook-Pro:rems2-3.4.7-new changzhenghe$ make install
CDPATH=”${ZSH_VERSION+.}:” && cd . && /bin/sh /Users/changzhenghe/tmp/rems2-3.4.7-new/missing aclocal-1.14 -I m4
/Users/changzhenghe/tmp/rems2-3.4.7-new/missing: line 81: aclocal-1.14: command not found
WARNING: ‘aclocal-1.14’ 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: *** [aclocal.m4] Error 127

make install时候报错了,找不到aclocal-1.14,看看我系统里aclocal什么版本的?

Changzheng-Hes-MacBook-Pro:rems2-3.4.7-new changzhenghe$ aclocal –version
aclocal (GNU automake) 1.16.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later https://gnu.org/licenses/gpl-2.0.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey tromey@redhat.com
and Alexandre Duret-Lutz adl@gnu.org.

安装系统上aclocal是1.16.1版本,比要求的版本还高啊~本来想利用alias建一个aclocal-1.14的,想想觉得这法子太土了,一定有更大气的方法。
autorecov 命令:

Changzheng-Hes-MacBook-Pro:rems2-3.4.7-new changzhenghe$
Changzheng-Hes-MacBook-Pro:rems2-3.4.7-new changzhenghe$ autoreconf -ivf
autoreconf: Entering directory .’ ~autoreconf: configure.ac: not using Gettext ~autoreconf: running: aclocal –force -I m4 ~autoreconf: configure.ac: tracing ~autoreconf: configure.ac: not using Libtool ~autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf –force ~autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoheader –force ~autoreconf: running: automake –add-missing –copy –force-missing ~autoreconf: Leaving directory.’

应该搞定了,再试试…

Changzheng-Hes-MacBook-Pro:rems2-3.4.7-new changzhenghe$ make install
/bin/sh ./config.status –recheck
running CONFIG_SHELL=/bin/sh /bin/sh ./configure –enable-server –enable-agent –with-mysql –enable-ipv6 –with-net-snmp –with-libcurl –with-libxml2 –with-ssh2 –enable-proxy –no-create –no-recursion
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… ./install-sh -c -d
checking for gawk… no

OK,打完收工…… 现在对于Unix/Linux环境的make不熟悉了,知识结构需要更新!

Leave Comment