【问题标题】:configure: error: Could not find a version of the library配置:错误:找不到库的版本
【发布时间】:2018-10-31 18:00:59
【问题描述】:

我正在构建this DNP3 program,当我按照构建说明进行操作时,./configure 不会生成 make 文件。当我运行它时,我得到以下输出:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for boostlib >= 1.43... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking whether the Boost::Date_Time library is available... yes
configure: error: Could not find a version of the library!

我认为最后一行可能会导致问题,但我不知道“图书馆”是什么。我使用“sudo apt-get install libboost-all-dev”安装了 boost,所以我不认为是这样,但我不知道。

【问题讨论】:

  • 可能是配置脚本不好,这是一个常见的错误原因;您可以查看配置脚本以确定报告问题的行并尝试了解它失败的原因(有时会在错误的位置查找文件)

标签: linux boost makefile configure


【解决方案1】:

另一个答案几乎对我有用。试试这个,如果你在 64 位机器上,这更有可能:

./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu/

(在 Ubuntu 14.04 上工作)

【讨论】:

  • 嗯,我想不用说,在 64 位系统中,--with-boost-libdir 标志您指定 /usr/lib/x86_64-linux-gnu/ 文件夹。
【解决方案2】:

我通过将带有“--with-boost-libdir”的库路径添加到“配置”来解决。 路径取决于 CPU 架构。 以树莓派 3 为例,命令为:

./configure --with-boost-libdir=/usr/lib/arm-linux-gnueabihf/

【讨论】:

    【解决方案3】:

    我能够使用 ./configure 命令的以下更改来解决它:

    ./configure --with-boost-libdir=/usr/lib/i386-linux-gnu/
    

    【讨论】:

      【解决方案4】:

      对于 openSUSE Tumbleweed,您应该安装 libboost-x1_77_0-devel 软件包及其依赖项,其中 x 是:系统、文件系统、测试以及任何其他所需的(您将看到错误信息)

      【讨论】:

        【解决方案5】:

        即使我有这个带有文件的/usr/lib/x86_64-linux-gnu/ 目录,其他答案提供的目录都不适合我。

        所以我设法通过安装所有相关依赖项来修复它: sudo apt-get install libboost-all-dev

        我在尝试配置比特币核心 BTW 时一直遇到错误。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2013-02-22
          • 2017-11-03
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多