libtool版本不匹配错误

发布于 2024-09-06 19:09:47 字数 610 浏览 7 评论 0原文

在 Ubuntu 10.04 上使用 kdevelop 3.5 构建应用程序时,出现以下错误:

libtool: Version mismatch error. This is libtool 2.2.6 Debian-2.2.6a-4, but the
libtool: definition of this LT_INIT comes from libtool 2.2.6b.
libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6 Debian-2.2.6a-4
libtool: and run autoconf again.
make[2]: *** [wktools4] Error 63
make[2]: Target `all' not remade because of errors.
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
*** Exited with status: 2 ***

Wherecan I get the required version of libtool, or how can I recreate aclocal.m4?

When building my application with kdevelop 3.5 on Ubuntu 10.04, I get the following errors:

libtool: Version mismatch error. This is libtool 2.2.6 Debian-2.2.6a-4, but the
libtool: definition of this LT_INIT comes from libtool 2.2.6b.
libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6 Debian-2.2.6a-4
libtool: and run autoconf again.
make[2]: *** [wktools4] Error 63
make[2]: Target `all' not remade because of errors.
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
*** Exited with status: 2 ***

Where can I get the needed version of libtool, or how can I recreate aclocal.m4?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

一身仙ぐ女味 2024-09-13 19:09:47

尝试

autoreconf --force --install
./configure
make

在项目的根目录中运行。

如果这不起作用,请尝试先运行 makemaintainer-clean,然后转到步骤 1。

如果仍然不起作用,请运行 makemaintainer-clean,然后删除项目根目录中所有生成的文件;包括aclocal.m4、任何m4目录、autom4te.cache目录、configure、Makefile。在、config.hconfig.h.inconfig.statuslibtoolltmain.sh 等。然后转到步骤 1。

为什么有效: libtoolaclocal.m4 是这两个文件都是由您的构建系统生成的。如果它们不同步(由不同版本的构建工具生成),则会出现此错误。通常这种情况不会发生,但是当您将生成的文件签入源代码管理时,可能会导致这种情况。

该解决方案的作用是删除并重新生成所有自动生成的文件。一旦它们被删除并重新生成,它们就不会再不同步了。

Try running

autoreconf --force --install
./configure
make

in the root directory of your project.

If that doesn't work, try running make maintainer-clean first and then go to step 1.

If that still doesn't work, run make maintainer-clean, then delete every generated file in the root directory of your project; including aclocal.m4, any m4 directory, any autom4te.cache directory, configure, Makefile.in, config.h, config.h.in, config.status, libtool, ltmain.sh, etc. Then go to step 1.

Why this works: libtool and aclocal.m4 are both files that are generated by your build system. If they are out of sync (generated by different versions of the build tools), then you get this error. Normally that shouldn't happen, but an example of something that can cause it is when you check in generated files to source control.

What this solution does is delete and regenerate all the autogenerated files. Once they're erased and regenerated, they can't be out of sync anymore.

不忘初心 2024-09-13 19:09:47

如果您使用的是 Anaconda,那么这可能是由于来自不同来源的 libtool 和 autoconf 造成的。您可以通过执行

which libtool

which autoconf

来检查这一点。我的 libtool 来自 conda,而 autoconf 是一个系统包。卸载 autoconf 并使用 conda

apt remove -y autoconf 再次安装 (Ubuntu/Debian)

conda install -c anaconda autoconf

注意:您可能还需要安装 automake。

conda install -c anaconda automake

If you are using Anaconda, then this could be due to libtool and autoconf from different sources. You can check this by executing

which libtool

which autoconf

My libtool was from conda and autoconf was a system package. Uninstalled autoconf and installed it again using conda

apt remove -y autoconf (Ubuntu/Debian)

conda install -c anaconda autoconf

Note: You may need to install automake too.

conda install -c anaconda automake

放血 2024-09-13 19:09:47

尝试

autoreconf -i

-i 选项很重要。

Try

autoreconf -i

The -i option is important.

冷清清 2024-09-13 19:09:47

也许您安装了两个不同版本的libtools。尝试apt-get删除所有(直到在命令行中输入which libtool时什么也得不到),然后apt-get install你喜欢的那个。

maybe you have installed two libtools of different version. Try to apt-get remove all (until you get nothing, when you type which libtool in the command line), then apt-get install the one you like.

陌生 2024-09-13 19:09:47

尝试运行 aclocal

Try running aclocal

无妨# 2024-09-13 19:09:47

我解决了卸载系统的 libtool 并从上游安装的问题: git clone git://git.savannah.gnu.org/libtool.git

sudo apt-get install texinfo autoconf automake make
./bootstrap
./configure
make
sudo make install

I solve that uninstalling system's libtool and installing from upstream: git clone git://git.savannah.gnu.org/libtool.git

sudo apt-get install texinfo autoconf automake make
./bootstrap
./configure
make
sudo make install
黎歌 2024-09-13 19:09:47

以上均无效。

然后这起作用了:

autoconf -f
./configure
make

None of the above worked.

Then this worked:

autoconf -f
./configure
make
﹏雨一样淡蓝的深情 2024-09-13 19:09:47

以上均无效。在我停用 conda 环境后,它起作用了:

source deactivate

None of the above worked. After I deactivated the conda environment, it worked:

source deactivate

扛起拖把扫天下 2024-09-13 19:09:47

我也遇到这个问题。就我而言,在 ./autogen.sh 的输出中,有:

libtoolize: 您应该将以下文件的内容添加到 'aclocal.m4': libtoolize: '/aclocal/libtool.m4' libtoolize: '/aclocal /ltoptions.m4' libtoolize: '/aclocal/ltversion.m4' libtoolize: 考虑将 'AC_CONFIG_MACRO_DIRS([m4])' 添加到 configure.ac、libtoolize: 并重新运行 libtoolize 和 aclocal。 libtoolize:考虑将“-I m4”添加到 Makefile.am 中的 ACLOCAL_AMFLAGS。

我只是将 /aclocal/ 下的三个 *.m4 文件的内容附加到 aclocal.m4 文件中:

cat <a path>/aclocal/libtool.m4 <a path>/aclocal/ltoptions.m4 <a path>/aclocal/ltversion.m4 >> aclocal.m4 

然后 make。

I also encounter this issue. In my case, in the output of ./autogen.sh, there is:

libtoolize: You should add the contents of the following files to 'aclocal.m4': libtoolize: '/aclocal/libtool.m4' libtoolize: '/aclocal/ltoptions.m4' libtoolize: '/aclocal/ltversion.m4' libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac, libtoolize: and rerunning libtoolize and aclocal. libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.

I just append the content the three *.m4 files under /aclocal/ to the aclocal.m4 file:

cat <a path>/aclocal/libtool.m4 <a path>/aclocal/ltoptions.m4 <a path>/aclocal/ltversion.m4 >> aclocal.m4 

then make.

呆头 2024-09-13 19:09:47

这是错误:

libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1.11, but the
libtool: definition of this LT_INIT comes from libtool 2.4.6.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1.11
libtool: and run autoconf again.

以上都不起作用。

然后这起作用了:

wget http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz -O /root/libtool-2.4.6.tar.gz
tar xzvf /root/libtool-2.4.6.tar.gz -C /root
cp -f /usr/share/libtool/build-aux/ltmain.sh /usr/share/libtool/build-aux/ltmain_sh
cp -f /root/libtool-2.4.6/build-aux/ltmain.sh /usr/share/libtool/build-aux/ltmain.sh

autoreconf -fi
./configure
make

here is the error:

libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1.11, but the
libtool: definition of this LT_INIT comes from libtool 2.4.6.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1.11
libtool: and run autoconf again.

None of the above worked.

Then this worked:

wget http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz -O /root/libtool-2.4.6.tar.gz
tar xzvf /root/libtool-2.4.6.tar.gz -C /root
cp -f /usr/share/libtool/build-aux/ltmain.sh /usr/share/libtool/build-aux/ltmain_sh
cp -f /root/libtool-2.4.6/build-aux/ltmain.sh /usr/share/libtool/build-aux/ltmain.sh

autoreconf -fi
./configure
make
染墨丶若流云 2024-09-13 19:09:47

我还为 autoconf 和 autoreconf 使用自定义包含目录,例如 autoreconf -I ./m4。因此,过时的 ltversion.m4 意外地出现在其中一个自定义包含内容中。这在这里导致了完全相同的错误。我通过删除过时的 ltversion.m4 文件解决了这个问题。

I also use custom include directories for autoconf and autoreconf, like autoreconf -I ./m4. So it happened that an outdated ltversion.m4 accidentially was sitting inside one of those custom includes. This caused exactly the same error here. I solved it by removing the outdated ltversion.m4 file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文