安装第三方 C 库。我之前遇到过几个错误,但这次修复后却无法解决问题

安装第三方 C 库。我之前遇到过几个错误,但这次修复后却无法解决问题

我正在尝试使用第三方 C 库。进入解压文件的目录后,我运行./configure并得到:

configure: creating ./config.status
config.status: creating tests/Makefile
config.status: creating tests/atlocal
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating igraph.pc
config.status: creating igraph_Info.plist
config.status: creating doc/Makefile
config.status: creating include/igraph_version.h
config.status: creating include/igraph_threading.h
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing tests/atconfig commands
config.status: executing depfiles commands
config.status: executing libtool commands

igraph successfully configured.
  GraphML format support -- no
  GMP library support    -- no
  GLPK library support   -- yes
  Thread-local storage   -- yes
  Use internal ARPACK    -- yes
  Use internal LAPACK    -- yes
  Use internal BLAS      -- yes
  Use internal F2C       -- yes
  Use internal GLPK      -- yes
  Debug build            -- no
  Profiling              -- no

然后我运行“sudo make”并得到:

collect2: error: ld returned 1 exit status
Makefile:2357: recipe for target 'libigraph.la' failed
make[3]: *** [libigraph.la] Error 1
make[3]: Leaving directory '/home/jiggly/Documents/igraph-0.7.1/src'
Makefile:1377: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/jiggly/Documents/igraph-0.7.1/src'
Makefile:480: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/jiggly/Documents/igraph-0.7.1'
Makefile:382: recipe for target 'all' failed
make: *** [all] Error 2

我也尝试过sudo checkinstall并得到:

make[2]: *** [libigraph.la] Error 1
make[2]: Leaving directory '/home/jiggly/Documents/igraph-0.7.1/src'
Makefile:7813: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/home/jiggly/Documents/igraph-0.7.1/src'
Makefile:480: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
****  Installation failed. Aborting package creation.
Restoring overwritten files from backup...OK
Cleaning up...OK
Bye.

当我指定前缀时,我得到同样的错误./config

答案1


Makefile:2357:目标“libigraph.la”的配方失败

  • 第 2357 行:缺少“libxml2-dev”:

    sudo apt-get install libxml2-dev libgmp-dev zlib1g-dev


注意:igraph 库不是第三方库。它只是约 100,000 个开源代码/库/应用程序中的一个。(许可证是“GNU 通用公共许可证”。)



相关内容