1.在http://www.boost.org/下载boost安装包boost_1_65_1.tar.gz

2.在Centos上解压tar -zxvf  boost_1_65_1.tar.gz后,cd进入boost_1_65_1目录

3.安装boost库到指定目录

./b2 install --prefix=/home/dj/lib/boost/ 

4.如果为了引用方便将目录加到环境变量中

在/etc/profile文件中添加

export CPLUS_INCLUDE_PATH=/home/dj/lib/boost/include:$CPLUS_INCLUDE_PATH

export LIBRARY_PATH=/home/dj/lib/boost/lib:$LIBRARY_PATH

export LD_LIBRARY_PATH=/home/dj/lib/boost/lib:$LD_LIBRARY_PATH

安装出现问题:

1.fatal error: pyconfig.h: No such file or directory,

缺少python依赖包

Ubuntu上 apt-get install python-dev

Centos上 yum install python-devel

2.Fatal error: can't create bin.v2/libs/python/build/gcc-4.8.5/release/link-static/threading-multi/converter/from_python.o: Permission denied

权限被限制

使用 sudo ./b2 install --prefix=/home/dj/lib/boost/

3.编译程序出现错误

/usr/bin/ld: build/objs/Wrap.o: undefined reference to symbol 'pthread_kill@@GLIBC_2.2.5'
/lib64/libpthread.so.0: error adding symbols: DSO missing from command line

在Makefile文件中 LIBS 添加 pthread

4.error while loading shared libraries: libboost_system.so.1.65.1: cannot open

这是找不到动态链接库的位置

首先 find / -name libboost_system.so.1.65.1 找到文件位置

然后在/etc/ld.so.conf 文件最后添加 /home/dj/lib/boost/lib  即动态库所在目录

/sbin/ldconfig是/etc/ld.so.conf生效

Centos 安装boost库的更多相关文章

  1. ubuntu 下安装boost库

    ubuntu下安装boost库,,在网上试了一些其他人推荐的libboost-dev 但是会缺少,编译程序会报错: /usr/bin/ld: cannot find -lboost_serializa ...

  2. linux下编译安装boost库

    linux下编译安装boost库 linux下编译安装boost库 1.下载并解压boost 1.58 源代码 下载 解压 2.运行bootstrap.sh 3.使用b2进行构建 构建成功的提示 4. ...

  3. VS2010下安装boost库

    在我们的C++项目中安装boost库,下面以VS2010版本作为例子,其它版本的设置也差不多. 一.编译生成boost库 1.下载最新的boost(本人下载的是boost_1_56_0).boost官 ...

  4. windows下编译和安装boost库

    boost是一个功能强大.构造精巧.跨平台.开源并且完全免费的C++程序库. 获取方式 boost提供源码形式的安装包,可以从boost官方网站下载,目前最新版本是1.59.0. 本机上正好有boos ...

  5. 树莓派上安装boost库

    一.安装boost库 sudo apt-get install libboost-dev aptitude search boost 二.编写测试代码 #include <iostream> ...

  6. 在RedHat 7.2中安装boost库

    在RedHat 7.2中安装boost库 环境,其它版本类似 Redhat7.2 64bit boost 1.64.0 步骤 去 boost官网 下载想要版本的.tar.gz,如下图 解压tar -v ...

  7. C++: Mac上安装Boost库并使用CLion开发

    1.下载安装Boost库 官网下载最新版本1.65.0:http://www.boost.org/users/history/version_1_65_0.html 选择UNIX版本: 下载后解压cd ...

  8. 安装Boost库

    获取方式 官网下载合适版本:https://www.boost.org/ 此处用的是boost_1_75_0版本 开发环境 推荐使用GCC 7.x.x或以上编译器 安装Boost库 此处采用简易安装, ...

  9. windows下安装boost库

    工作中现在会接触boost,所以我计划两个月之内努力熟悉一下boost.今天在自己win10系统上尝试安装了boost库,下面把遇到的问题总结一下: 1. 下好1.61版本库,在boost目录下运行b ...

随机推荐

  1. 【ASP.NET MVC 学习笔记】- 05 依赖注入工具Ninject

    本文参考:http://www.cnblogs.com/willick/p/3223042.html 1.Ninject是一款轻量级的DI工具,可通过VS的插件NuGet将其引用到项目中. 2.使用N ...

  2. LeetCode 189. Rotate Array (旋转数组)

    Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array  ...

  3. 读书笔记-你不知道的JS上-混入与原型

    继承 mixin混合继承 function mixin(obj1, obj2) { for (var key in obj2) { //重复不复制 if (!(key in obj1)) { obj1 ...

  4. spark join操作解读

    本文主要介绍spark join相关操作,Java描述. 讲述三个方法spark join,left-outer-join,right-outer-join 我们以实例来进行说明.我的实现步骤记录如下 ...

  5. linux学习(五)系统目录结构,ls命令,文件类型,alias

    一.系统目录结构 在我们的根目录下,有这样一些文件夹 /bin /sbin /usr/bin /usr/sbin /sbin一般都是root用户用的 /boot 系统启动相关的,grup就放在这里,这 ...

  6. 暑假练习赛 006 A Vanya and Food Processor(模拟)

    Description Vanya smashes potato in a vertical food processor. At each moment of time the height of ...

  7. Codeforces 376C. Socks

    C. Socks time limit per test 2 seconds memory limit per test 256 megabytes input standard input outp ...

  8. java读写锁ReadWriteLock

    package com.java.concurrent; import java.util.concurrent.locks.ReadWriteLock; import java.util.concu ...

  9. 【IDEA】向IntelliJ IDEA创建的项目导入Jar包的两种方式

    转载请注明出处:http://blog.csdn.net/qq_26525215 本文源自[大学之旅_谙忆的博客] 今天用IDEA,需要导入一个Jar包,因为以前都是用eclipse的,所以对这个id ...

  10. Cocoapods使用过程中遇到的问题

    前言:记录一些在CocoaPods使用过程中遇到的问题,本地环境:Xcode9.0 发现有的时候在执行pod init的时候不能正常地创建出来pod File文件,显示的错误如下: ――― MARKD ...