sed:无法读取/usr/lib/libltdl.a:没有这样的文件或目录

sed:无法读取/usr/lib/libltdl.a:没有这样的文件或目录

我尝试安装该软件包库图但在执行时make它说

justin@justin-HP-Pavilion-g6-Notebook-PC ~/Downloads/libgraph-1.0.1 $ make
Makefile:781: warning: overriding commands for target `libgraph.pc'
Makefile:333: warning: ignoring old commands for target `libgraph.pc'
make  all-recursive
make[1]: Entering directory `/home/justin/Downloads/libgraph-1.0.1'
Makefile:781: warning: overriding commands for target `libgraph.pc'
Makefile:333: warning: ignoring old commands for target `libgraph.pc'
Making all in doc
make[2]: Entering directory `/home/justin/Downloads/libgraph-1.0.1/doc'
Making all in man
make[3]: Entering directory `/home/justin/Downloads/libgraph-1.0.1/doc/man'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/justin/Downloads/libgraph-1.0.1/doc/man'
make[3]: Entering directory `/home/justin/Downloads/libgraph-1.0.1/doc'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/justin/Downloads/libgraph-1.0.1/doc'
make[2]: Leaving directory `/home/justin/Downloads/libgraph-1.0.1/doc'
make[2]: Entering directory `/home/justin/Downloads/libgraph-1.0.1'
Makefile:781: warning: overriding commands for target `libgraph.pc'
Makefile:333: warning: ignoring old commands for target `libgraph.pc'
/bin/bash ./libtool --mode=link gcc  -DFONTDIR=\""/usr/local/share/libgraph/Font/"\"   -o libguile-libgraph.la -rpath /usr/local/lib -version-info 0:2:0 -export-dynamic -lguile -lguile-ltdl -Wl,-Bsymbolic-functions -lcrypt -lm -ldl   guile-libgraph.lo -lgraph -lm -lSDL_image -L/usr/lib/x86_64-linux-gnu -lSDL 
grep: /usr/lib/libltdl.la: No such file or directory
sed: can't read /usr/lib/libltdl.la: No such file or directory
libtool: link: `/usr/lib/libltdl.la' is not a valid libtool archive
make[2]: *** [libguile-libgraph.la] Error 1
make[2]: Leaving directory `/home/justin/Downloads/libgraph-1.0.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/justin/Downloads/libgraph-1.0.1'
make: *** [all] Error 2

答案1

您显然需要安装一些额外的开发库来构建libgraph;这些应该在源代码包含的INSTALL或文件中提到。README

在我的 Debian 系统上,我需要安装libltdl-dev来解决您显示的问题,但是之后可能还需要其他开发库(编译在第一个错误后停止,因此当出现问题时您看不到所有要求)。

也就是说,我只是将 Debian 版本安装libgraph为软件包,就像 Faheem Mitha 所建议的那样。

编辑:Debian 的当前版本libgraph打包为libgraph4

$ apt-cache show libgraph4
Package: libgraph4
Source: graphviz
Version: 2.26.3-14+deb7u2
Installed-Size: 146
Maintainer: David Claughton <[email protected]>
Architecture: amd64
Depends: libc6 (>= 2.7), libcdt4, libltdl7 (>= 2.4.2)
Conflicts: libgraphviz4
Description-en: rich set of graph drawing tools - graph library
 Graphviz is a set of graph drawing tools. See the description of the graphviz
 package for a full description.
 .

该包包含图形库。

答案2

最后我知道了如何修复错误。纠正错误所需的步骤是:

  1. 卸载软件包libtool
  2. libtool按照中给出的安装库工具(libtool 的文件位于/usr/lib/x86_64-linux-gnu
  3. 搜索为了自由软件使用 中的搜索栏,/usr/lib/x86_64-linux-gnu您将获得 5 个文件:(libltdl.a包)、libltdl.a(脚本文件)libltdl.so、、、、libltdl.so.7libltdl.so.7.3.0
  4. 将这5个文件复制到/usr/lib/.
  5. 你已经完成了,执行后就make不会出现错误:libltdl.a is not a valid libtool archive

注意:这里我在 Linux Mint 16 64 位 MATE 版本上尝试过这个。我不确定其他操作系统是否如此。

相关内容