Linux中‘aclocal-1.15‘ is missing on your system
錯誤提示:
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/agssvYX/moosefs-3.0/moosefs-3.0/missing aclocal-1.15 -I m4 /home/agssvYX/moosefs-3.0/moosefs-3.0/missing: 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: *** [aclocal.m4] Error 127
問題分析:
1.找不到aclocal-1.15命令,有可能是沒有權限訪問這個命令,也有可能路徑沒有搜索到,也可能是根本沒有安裝這個程序,執行命令:sudo find / -name aclocal,能找到aclocal在/usr/share/aclocal和/usr/bin/aclocal
2.經查aclocal屬於automake的一部分,關於aclocal的解釋見:http://www.adp-gmbh.ch/misc/tools/configure/aclocal.html ,它主要在進行makefile時,用來定義文件放置的地方,會產生autom4te.cache和aclocal.m4這兩個文件,但是錯誤中是說aclocal-1.15找不到,會不會是版本問題,執行命令:aclocal --version,發現:aclocal (GNU automake) 1.11.1,也就是說系統版本有點低
升級automake
1.下載automake-1.15, ftp://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
2.執行命令:./configure --prefix=/usr/local/automake-1.15,提示錯誤:configure: error: Autoconf 2.65 or better is required.
3.查看autoconf版本:autoconf --version,提示:autoconf (GNU Autoconf) 2.63,即是autoconf版本過低
升級autoconf
1.下載autoconf-2.65,http://ftpmirror.gnu.org/autoconf/autoconf-2.65.tar.gz
2.執行命令:./configure --prefix=/usr/local/autoconf-2.65,然後執行:sudo make,提示:sh: build-aux/git-version-gen: Permission denied autom4te: /usr/bin/m4 failed with exit status: 1 aclocal-1.11: autom4te failed with exit status: 1,對build-aux/git-version-gen進行賦權:sudo chmod 777 build-aux/git-version-gen,再次執行:sudo make&&sudo make install沒有問題
3.卸載舊版本autoconf:sudo rpm -e --nodeps autoconf-2.59,創建軟鏈:sudo ln -s /usr/local/autoconf-2.65/bin/autoconf /usr/bin/autoconf,賦權:sudo chmod 777 -R /usr/local/autoconf-2.65,sudo chmod 777 /usr/bin/autoconf
4.查看autoconf版本:autoconf --version,提示:autoconf (GNU Autoconf) 2.65,升級成功
5.回到automake,進行sudo make,出現錯誤:Can‘t locate /aclocal in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) ,好一頓搜索發現原來是因為先解壓後上傳服務器導致的
6.上傳automake-1.15壓縮包,然後進行解壓,執行:./configure --prefix=/usr/local/automake-1.15&&sudo make&&sudo make install完成安裝
7.卸載舊版本的automake:sudo rpm -e --nodeps automake,創建軟鏈:sudo ln -s /usr/local/automake-1.15/bin/automake /usr/bin/automake,賦權:sudo chmod -R 777 /usr/local/automake-1.15/,sudo chmod 777 /usr/bin/automake
8.查看automake版本:automake --version,提示:automake (GNU automake) 1.15,升級成功
Linux中‘aclocal-1.15‘ is missing on your system