0

从昨天开始,我一直在为此苦苦挣扎。我正在尝试安装Osrm在两个纬度/经度点之间提供街道路由方向的路由库。我克隆了 OSRM 存储库并运行了基本的安装说明。

mkdir -p build
cd build
>>> cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
sudo cmake --build . --target install

当我运行时,cmake ..我收到这些错误

CMake Warning at /usr/local/share/cmake-3.6/Modules/FindBoost.cmake:743 (message):
  Imported targets not available for Boost version 106400
Call Stack (most recent call first):
  /usr/local/share/cmake-3.6/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/local/share/cmake-3.6/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:482 (find_package)

该库仍然可以正常编译。但是当我去运行 Osrm 库的第一个配置命令时,我得到了这个错误:

osrm-extract: /opt/copy-client/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by osrm-extract)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by osrm-extract)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by osrm-extract)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by osrm-extract)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/local/lib/libboost_program_options.so.1.64.0)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/lib/libboost_program_options.so.1.64.0)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/local/lib/libboost_regex.so.1.64.0)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/lib/libboost_regex.so.1.64.0)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/local/lib/libboost_filesystem.so.1.64.0)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/lib/libboost_filesystem.so.1.64.0)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/lib/libboost_iostreams.so.1.64.0)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/lib/libboost_system.so.1.64.0)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/lib/libstxxl.so.1)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/libstxxl.so.1)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/libstxxl.so.1)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libtbb.so.2)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicui18n.so.55)
osrm-extract: /opt/copy-client/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.55)

所以这就是问题所在。现在,我一直在谷歌搜索这些错误,但似乎没有一个解决方案与我的情况相关。

首先,我cmake安装了 3.6.2 版本。其他帖子建议将 cmake 升级到 3.5 以北的版本。

我还boost安装了 1.64.0 版本,这是最新版本。似乎 cmake 在执行配置步骤时正在查找此版本。

gcc最后,我也在使用g++5.4.1 版。其他帖子都在谈论升级到 gcc 4.9 版,但我实际上也在那个版本的北边。

所以我在上面提到的配置步骤中查看了错误消息:

(_Boost_COMPONENT_DEPENDENCIES)
      /usr/local/share/cmake-3.6/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES)
      CMakeLists.txt:482 (find_package)

我挖到了CMakeLists.txt482 行。那行说

  find_package(Boost 1.54 REQUIRED COMPONENTS ${BOOST_COMPONENTS})

所以我能看到的唯一想法是 Osrm 包正在寻找 boost 1.54。现在既然我有 1.64.0 版本,Cmake 不应该接受最新版本吗?不知道为什么这些必需的组件?

有人有什么建议吗?

4

0 回答 0