为什么 rtorrent 构建失败?

为什么 rtorrent 构建失败?

我不是root,所以我必须从源代码构建 rtorrent 并希望将其安装在我的主目录中,但它失败了,为什么?

[mirror@hugemeow rtorrent]$ ls
AUTHORS  autogen.sh  ChangeLog  configure.ac  COPYING  doc  INSTALL  Makefile.am  NEWS  rak  README  scripts  src  test
[mirror@hugemeow rtorrent]$ ./autogen.sh
aclocal...
aclocal:configure.ac:7: warning: macro `AM_PATH_CPPUNIT' not found in library
autoheader...
libtoolize... using libtoolize
automake...
configure.ac: installing `./install-sh'
configure.ac: installing `./missing'
src/Makefile.am: installing `./depcomp'
autoconf...
configure.ac:7: error: possibly undefined macro: AM_PATH_CPPUNIT
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

虽然 autoge 失败,但是配置脚本已创建。

[mirror@hugemeow rtorrent]$ ls
aclocal.m4  autogen.sh      ChangeLog     config.h.in  configure     COPYING  doc      install-sh  Makefile.am  missing  rak     scripts  test
AUTHORS     autom4te.cache  config.guess  config.sub   configure.ac  depcomp  INSTALL  ltmain.sh   Makefile.in  NEWS     README  src

跑了configure,但失败了意外标记“1.9.6”附近有语法错误,出了什么问题?我应该怎么做才能为我的 CentOS 构建这个 rtorrent?

[mirror@hugemeow rtorrent]$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
./configure: line 2016: syntax error near unexpected token `1.9.6'
./configure: line 2016: `AM_PATH_CPPUNIT(1.9.6)'
[mirror@hugemeow rtorrent]$ git branch
* master
[mirror@hugemeow rtorrent]$ git branch  -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/c++11
  remotes/origin/master
[mirror@hugemeow rtorrent]$ git tag
0.9.0
0.9.1
[mirror@hugemeow rtorrent]$ git clean -dfx
Removing Makefile.in
Removing aclocal.m4
Removing autom4te.cache/
Removing config.guess
Removing config.h.in
Removing config.log
Removing config.sub
Removing configure
Removing depcomp
Removing doc/Makefile.in
Removing install-sh
Removing ltmain.sh
Removing missing
Removing src/Makefile.in
Removing src/core/Makefile.in
Removing src/display/Makefile.in
Removing src/input/Makefile.in
Removing src/rpc/Makefile.in
Removing src/ui/Makefile.in
Removing src/utils/Makefile.in
Removing test/Makefile.in

编辑1:有关 libtool 和 libtools 的详细信息

[mirror@hugemeow rtorrent]$ libtoolize --version
libtoolize (GNU libtool) 1.5.22

Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[mirror@hugemeow rtorrent]$ libtool --version
ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)

Copyright (C) 2005  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

答案1

刚刚遇到了同样的问题,正如@mikio-tsunematsu 在评论中指出的那样,解决方案是安装libcppunitlibcppunit-dev(或cppunitcppunit-devel)。正如您所说,您无法使用包管理器安装它们,那么您唯一的解决方案是获取源代码并在您的目录中编译它们。

您通常可以下载您的发行版的软件包源并使用它进行编译,这可能有助于使用您系统上安装的工具。

因为它对我有用,HTH

答案2

该语法错误暗示 ./configure 失败。你有库工具已安装/已更新?

答案3

只需编辑configure.ac并删除该AM_PATH_CPPUNIT(1.9.6)行,之后autogen.sh应该会生成一个configure不会出错的内容。

相关内容