【问题标题】:Boost is installed where on my Ubuntu?Boost 安装在我的 Ubuntu 上的什么位置?
【发布时间】:2013-09-17 05:40:23
【问题描述】:

我从 Boost 网站下载 Boost 1.54 tar,然后按照此处 [1] 中详细说明的说明进行操作。

我特别想在文件夹中安装我的 boost 库

$HOME/BOOST

使用这个:

$ ./bootstrap.sh --prefix=$HOME/BOOST

但是安装后,这个文件夹还是空的。这是为什么呢?

P.S.: Boost 安装最后说:

common.copy stage/lib/libboost_wave.a
...failed updating 62 targets...
...skipped 18 targets...
...updated 1004 targets...

[1]http://www.boost.org/doc/libs/1_54_0/more/getting_started/unix-variants.html

【问题讨论】:

  • 你为什么不使用 apt-get install libboost libboost-dev?
  • 我这样做了,但由于某种原因,我仍然无法准确定位头文件和 .so 文件的位置。
  • 你试过运行locate boost吗?
  • 可能是/usr/local。这是从源代码安装大多数软件时的默认设置。
  • 您根本不需要找到它。编译时,编译器使用pkg-config libboost-dev --cflags,链接器使用pkg-config libboost --libs

标签: c++ linux ubuntu boost


【解决方案1】:

boost 库文件位于 /usr/lib/x86_64-linux-gnu。您还会在那里看到一大堆其他库。

【讨论】:

    【解决方案2】:

    如果你使用以下命令:

    sudo apt-get install libboost-all-dev

    要在你的 Ubuntu 发行版上安装 boost 库,然后你可以使用这个命令找到位置

    whereis boost.

    通常它存储在位置/usr/include/boost

    【讨论】:

    • 在 /usr/include/boost 中,我只找到 .hpp 文件,.so 和 .a 文件(库)在哪里?
    • 如果需要查找特定目录,您可能需要检查系统上的 /usr/local/lib 或 /lib 目录,也可以运行命令 sudo find / -name " boost.so.*" 这将为您提供 boost so 文件的位置,以防它们存储在您的系统上
    • 在我的情况下,我在 /usr/include/boost 中有条目,但在您的 find 命令中找不到任何其他内容。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-04-14
    • 2011-03-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-25
    相关资源
    最近更新 更多