boost - libboost1.74-dev 未安装在 Ubuntu 16.04 上

标签 boost cmake

我当前的 boost 软件包是 libboost-all-dev(默认版本 1.58.0.1),对于我当前的需要来说它已经很旧了。所以我尝试了 -

sudo apt-get install libboost1.74 libboost1.74-dev

它向我展示了某种错误 -

libboost1.74 is already the newest version (1.74-0~16~ubuntu16.04.1).
The following NEW packages will be installed:
  libboost1.74-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/9,325 kB of archives.
After this operation, 139 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 393826 files and directories currently installed.)
Preparing to unpack .../libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb ...
Unpacking libboost1.74-dev (1.74-0~16~ubuntu16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/boost/exception_ptr.hpp', which is also in package libboost1.58-dev:amd64 1.58.0+dfsg-5ubuntu3.1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libboost1.74-dev_1.74-0~16~ubuntu16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

但是我之前尝试过多次手动安装 boost 库。但它们似乎不起作用,所以我手动删除了它们。这个问题与我的手动删除过程有关吗?或者也许我做错了什么?

最佳答案

该消息明确表明您需要先卸载 1.58:

trying to overwrite '/usr/include/boost/exception_ptr.hpp', which is also in package libboost1.58-dev

关于boost - libboost1.74-dev 未安装在 Ubuntu 16.04 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64312171/

相关文章:

c++ - boost 正则表达式不匹配标签

visual-studio-2012 - 多配置生成器中基于 CMake 配置的条件

c++ - 将 SDL2 与 CMake 一起使用

c++ - Cmake 托管 C++

macos - 无法使用 brew 安装 boost 1.59

c++ - 如何在 C++ 中进行 regex_match #(哈希符号)?

c++ - 链接到通过 cmake 使用 boost 的库时删除 boost 依赖项

android - 如何用Android.mk编译Cmake文件?

c++ - 通过 BGL 使用 Min-Cut 的图像分割示例?

c++ - std::generate - 如何使用随机数生成器?