Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install boost library on CentOS 7.3 64bit?

I need to build a C++ project which uses Boost library on CentOS. I tried this:

yum install boost-devel

But I get dependency errors and Boost is not installed:

--> Processing Dependency: libicuuc.so.42()(64bit) for package: libboost_regex1_59_0-1.59.0-1.x86_64
--> Processing Dependency: libicui18n.so.42()(64bit) for package: libboost_regex1_59_0-1.59.0-1.x86_64
--> Processing Dependency: libicudata.so.42()(64bit) for package: libboost_regex1_59_0-1.59.0-1.x86_64
--> Finished Dependency Resolution
Error: Package: libboost_log1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicuuc.so.42()(64bit)
Error: Package: libboost_locale1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicudata.so.42()(64bit)
Error: Package: libboost_regex1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicudata.so.42()(64bit)
Error: Package: libboost_locale1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicui18n.so.42()(64bit)
Error: Package: libboost_log1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicudata.so.42()(64bit)
Error: Package: libboost_graph1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicuuc.so.42()(64bit)
Error: Package: libboost_regex1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicuuc.so.42()(64bit)
Error: Package: libboost_graph1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicui18n.so.42()(64bit)
Error: Package: libboost_locale1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicuuc.so.42()(64bit)
Error: Package: libboost_regex1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicui18n.so.42()(64bit)
Error: Package: libboost_log1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicui18n.so.42()(64bit)
Error: Package: libboost_graph1_59_0-1.59.0-1.x86_64 (enetres)
           Requires: libicudata.so.42()(64bit)

Am I supposed to install these dependencies manually? Or what is wrong exactly and what should I do?

like image 589
Tomáš Zato - Reinstate Monica Avatar asked May 24 '17 11:05

Tomáš Zato - Reinstate Monica


1 Answers

Usually on centos 7, I do

yum update
yum install epel-release

and then

yum install boost boost-thread boost-devel

So far, it's worked for me. Maybe first two commands are what you need to do initially. You can ask if any problem occurs later. Be aware that Boost 1.53.0 ist the current version on YUM. If you need a version above that, you'll need to build from source. See https://www.boost.org/doc/libs/1_73_0/more/getting_started/unix-variants.html for details.

like image 88
Sherzodbek Avatar answered Oct 23 '22 11:10

Sherzodbek