配置:错误:找不到该库的版本

时间:2018-10-31 18:00:59

标签: linux boost makefile configure

我正在构建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,所以我不这么认为,但是我不知道。

3 个答案:

答案 0 :(得分:2)

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

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

答案 1 :(得分:1)

另一个答案几乎对我有用。尝试此操作,如果您使用的是64位计算机,则更有可能:

INDEX(productId, date)

(在Ubuntu 14.04上工作)

答案 2 :(得分:0)

我可以通过对 ./ configure 命令进行以下更改来解决此问题:

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