【问题标题】:Libtool library used but `LIBTOOL' is undefined?使用了 Libtool 库,但未定义“LIBTOOL”?
【发布时间】:2013-03-20 04:06:10
【问题描述】:

我正在尝试在我的服务器上安装 ffmpeg。我取消了 centos 5。

当我尝试安装 libfdk_aac 时出现以下错误

` 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/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --force-missing
Makefile.am:31: Libtool library used but `LIBTOOL' is undefined
Makefile.am:31:
Makefile.am:31: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
Makefile.am:31: to `configure.ac' and run `aclocal' and `autoconf' again.
Makefile.am: C objects in subdir but `AM_PROG_CC_C_O' not in `configure.ac'
autoreconf: automake failed with exit status: 1 ` 

如果我键入哪个 libtool,我会得到 /usr/bin/libtool,所以我认为 libtool 已安装。 所以我不确定为什么会发生这个错误。

感谢您的建议

【问题讨论】:

  • 在 ubuntu 下这一行为我修复了它:apt-get install libtool
  • 尝试先在该目录中运行libtoolize,然后重新运行autoreconf
  • 关于术语的注释。如果您正在运行autoreconf,那么您所做的不仅仅是尝试“安装”ffmpeg。您正在尝试构建整个包,而不仅仅是从预先构建的包构建和安装。

标签: ffmpeg centos5


【解决方案1】:

错误告诉您libtool 没有安装,或者您没有在configure.ac 中检查它。在configure.ac 中添加行LT_INIT。如果autoreconf 抱怨它不知道LT_INIT 是什么,您应该安装libtool,升级您的libtool 安装或使用configure.ac 中已弃用的AC_PROG_LIBTOOL。 (在较新的项目中,AC_PROG_LIBTOOL 应替换为 LT_INIT。)

【讨论】:

  • 答案有点帮助,但实际上并没有说明该怎么做。 “使用 AC_PROG_LIBTOOL”是什么意思?
  • @frabcus 这意味着如果在 configure.ac 中添加 'LT_INIT' 不起作用,您应该添加行 'AC_PROG_LIBTOOL'。但是,现在这是一个不好的建议。 AC_PROG_LIBTOOL 已完全弃用,如果添加 'LT_INIT' 不起作用,则建议升级整个 autotool 链,而不是尝试使用古老的 cruft。
  • @WilliamPursell 我在理论上同意但在实践中不同意。刚刚添加了AC_PROG_LIBTOOL 来编译libxslt,它就像一个魅力...... :)
  • 可能是抱怨你没有检查它,但也可能是它没有安装。如果它已安装,那么它抱怨你没有检查它,但如果它没有安装,那么它实际上是在抱怨它没有安装。我正在编译一些东西并且出现了那个错误,结果发现 libtool 没有安装(并且 configure.ac 实际上有 LT_INIT)。
【解决方案2】:

我有同样的问题。做了以下

$brew install libtool
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libtool-    2.4.2.mavericks.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring libtool-2.4.2.mavericks.bottle.2.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
?  /usr/local/Cellar/libtool/2.4.2: 66 files, 2.2M
fdk-aac $ glibtoolize
fdk-aac $ autoreconf -fiv
fdk-aac $ ./configure
fdk-aac $ make
fdk-aac $ make -install
go to ffmpeg/build
ffmpeg/build$ ../configure --enable-libfdk-aac --enable-nonfree
ffmpeg/build$make
ffmpeg/build$sudo make install
do ls /usr/local/lib/*fdk* check that libfdk-aac is installed
go to my application

 myapp/build$cmake ../
 myapp/build$make

希望对你有帮助

【讨论】:

    【解决方案3】:

    我在 centos 中为 nginx 安装 geoip 时遇到了同样的问题(尝试运行 make 命令时),这就是我所做的。 百胜安装 libtool 在 configure.in 末尾添加以下行 AC_CONFIG_MACRO_DIR([m4])

    在 Makefile.am 的末尾添加以下行 ACLOCAL_AMFLAGS = -I m4

    运行 $ 本地 $ libtoolize

    别问我为什么。但这行得通。

    【讨论】:

      【解决方案4】:

      我在为 cairo 做 ./autogen.sh 时遇到了这个问题。

      抱怨的信息确实很容易理解。

      但以下修复了它:

      $ export ACLOCAL_PATH="/usr/share/aclocal/:/usr/local/share/aclocal"
      $ ./autogen.sh
      

      【讨论】:

        猜你喜欢
        • 2013-09-29
        • 2013-07-10
        • 1970-01-01
        • 1970-01-01
        • 2013-03-05
        • 1970-01-01
        • 2011-07-14
        • 2014-04-27
        • 1970-01-01
        相关资源
        最近更新 更多