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

libboost1.74-dev未安装在Ubuntu 16.04上,boost,cmake,Boost,Cmake,我当前的boost包是libboostall-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: libb

我当前的boost包是libboostall-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:

试图覆盖“/usr/include/boost/exception_ptr.hpp”,它也在libboost1.58-dev包中