Ubuntu linux编译alsa-lib报错 automake-1.16: command not found 的解决方案

在编译alsa的时候报错,config完毕后,make错误如下: line 81: automake-1.16: command not found

root@sw-desktop:/home/libalsa/src/alsa-lib-1.2.3.2/alsa-lib-1.2.3.2# make
 cd . && /bin/bash /home/libalsa/src/alsa-lib-1.2.3.2/alsa-lib-1.2.3.2/missing automake-1.16 --foreign
/home/libalsa/src/alsa-lib-1.2.3.2/alsa-lib-1.2.3.2/missing: line 81: automake-1.16: command not found
WARNING: 'automake-1.16' is missing on your system.
         You should only need it if you modified 'Makefile.am' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'automake' program is part of the GNU Automake package:
         <https://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <https://www.gnu.org/software/autoconf>
         <https://www.gnu.org/software/m4/>
         <https://www.perl.org/>
Makefile:357: recipe for target 'Makefile.in' failed
make: *** [Makefile.in] Error 1

而我的automke的版本为1.15

 $automake --version
automake (GNU automake) 1.15
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>.

于是卸载了这个automake后,http://ftp.gnu.org/gnu/automake/下载了最新的1.16,然后安装,然后继续编译alsa,报错:

error: version mismatch.  This is Automake 1.16,

root@sw-desktop:/home/libalsa/src/alsa-lib-1.2.3.2/alsa-lib-1.2.3.2# make
 cd . && /bin/bash /home/libalsa/src/alsa-lib-1.2.3.2/alsa-lib-1.2.3.2/missing automake-1.16 --foreign
configure.ac:16: error: version mismatch.  This is Automake 1.16,
configure.ac:16: but the definition used by this AM_INIT_AUTOMAKE
configure.ac:16: comes from Automake 1.16.1.  You should recreate
configure.ac:16: aclocal.m4 with aclocal and run automake again.
WARNING: 'automake-1.16' is probably too old.
         You should only need it if you modified 'Makefile.am' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'automake' program is part of the GNU Automake package:
         <https://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <https://www.gnu.org/software/autoconf>
         <https://www.gnu.org/software/m4/>
         <https://www.perl.org/>
Makefile:357: recipe for target 'Makefile.in' failed
make: *** [Makefile.in] Error 1

解决方案是:

1 、autoscan 用 autoscan 产生一个 configure.in 的原型,执行autoscan 后会产生一个configure.scan 的文件,可以用它作为 configure.in文件的蓝本。
2、 执行 aclocal 和 autoconf ,分別会产生 aclocal.m4 及 configure 两个文件 
3、然后执行: automake --add-missing
4、 最后执行: ./configure

其实不要重新安装automake,在此记录一下,后面学习alsa会用到!

  • 5
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值