Ubuntu18.04下安装boost和muduo库
安装boost库
-
官网下载boost库
https://boostorg.jfrog.io/ui/native/main/release
自己下载自己所需版本xxx.tar.gz的压缩包
本文下载的是boost_1_69_0.tar.gz -
把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
-
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
-
运行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