簡體   English   中英

配置:錯誤:找不到庫的版本

[英]configure: error: Could not find a version of the library

我正在構建這個 DNP3 程序,當我按照構建說明進行操作時。/configure 不會生成 make 文件。 當我運行它時,我得到以下 output:

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,所以我不認為是這樣,但我不知道。

另一個答案幾乎對我有用。 試試這個,如果你在 64 位機器上,這更有可能:

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

(適用於 Ubuntu 14.04)

我通過將帶有“--with-boost-libdir”的庫路徑添加到“配置”來解決。 路徑取決於 CPU 架構。 例如,對於樹莓派 3,命令是:

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

即使我有這個/usr/lib/x86_64-linux-gnu/目錄及其文件,其他答案提供的目錄都不適合我。

所以我設法通過安裝所有相關的依賴項來修復它: sudo apt-get install libboost-all-dev

我在嘗試配置比特幣核心 BTW 時一直堅持錯誤。

我能夠使用./configure命令的以下更改來解決它:

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

對於 openSUSE Tumbleweed,您應該安裝 libboost-x1_77_0-devel 軟件包及其依賴項,其中 x 是:系統、文件系統、測試和任何其他所需的(您將看到錯誤消息還需要什么)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM