Ubuntu18.04下安装boost和muduo库

本文详细介绍了在Ubuntu18.04上安装boost和muduo库的步骤,包括下载、解压、编译、安装及验证过程。对于boost,需要下载源码,运行bootstrap.sh和b2编译,然后将库文件安装到系统路径。对于muduo,同样需要下载源码,修改CMakeLists.txt,使用cmake构建并安装到系统路径。
摘要由CSDN通过智能技术生成

Ubuntu18.04下安装boost和muduo库


安装boost库

  1. 官网下载boost库
    https://boostorg.jfrog.io/ui/native/main/release
    自己下载自己所需版本xxx.tar.gz的压缩包
    本文下载的是boost_1_69_0.tar.gz

  2. 把Linux系统下的boost源码包boost_1_69_0.tar.gz拷贝到某一指定路径下,然后解压,如下:

    ccc@ccc:~$ ls
    boost_1_69_0.tar.gz
    ccc@ccc:~$ tar -zxvf boost_1_69_0.tar.gz 
    
  3. tar解压完成后,进入源码文件目录,查看内容,安装下依赖库:

    ccc@ccc:~$ ls
    boost_1_69_0  boost_1_69_0.tar.gz
    ccc@ccc:~$ cd boost_1_69_0/
    ccc@ccc:~/boost_1_69_0$ ls
    boost            boostcpp.jam  boost.png      bootstrap.sh  index.htm   INSTALL  libs             more     status
    boost-build.jam  boost.css     bootstrap.bat  doc           index.html  Jamroot  LICENSE_1_0.txt  rst.css  tools
    ccc@ccc:~/boost_1_69_0$ sudo apt-get update
    ccc@ccc:~/boost_1_69_0$ sudo apt-get install build-essential g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev libboost-all-dev
    
  4. 运行bootstrap.sh工程编译构建程序,需要等待一会儿,查看目录:

    ccc@ccc:~/boost_1_69_0$ ./bootstrap.sh 
    Building Boost.Build engine with toolset gcc... tools/build/src/engine/bin.linuxx86_64/b2
    Unicode/ICU support for Boost.Regex?... not found.
    Generating Boost.Build configuration in project-config.jam...
    
    Bootstrapping is done. To build, run:
    
        ./b2
        
    To adjust configuration, edit 'project-config.jam'.
    Further information:
    
       - Command line help:
         ./b2 --help
         
       - Getting started guide: 
         http://www.boost.org/more/getting_started/unix-variants.html
         
       - Boost.Build documentation:
         http://www.boost.org/build/doc/html/index.html
    
    ccc@ccc:~/boost_1_69_0$ ls
    b2     boost-build.jam  boost.png      bootstrap.sh  index.html  libs             project-config.jam  tools
    bjam   boostcpp.jam     bootstrap.bat  doc           INSTALL     LICENSE_1_0.txt  rst.css
    boost  boost.css    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

清梦旅人

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值