ubuntu repository configuration muduo

Dependent libraries installation

  • sudo apt-get install cmake
  • sudo apt-get install libboostxxx-dev (将xxx替换为数字)方法:先输入 sudo apt-get install libboost-dev,系统会提示依赖哪个版本。  

  • sudo apt-get install libboost1.65-dev

  • sudo apt-get install libcurl4-openssl-dev

  • sudo apt-get install libc-ares-dev (note here is not linc-ares-dev)
  • sudo apt-get install protobuf-compiler

  • sudo apt-get install libprotobuf-dev

 

Installation: Compile muduo of (release version)

./build.sh -j2 //编译库和它自带的例子,生成可执行文件和静态库文件,分别位于../buidl/release/{bin,lib}
Need to compile g ++ / gcc

  • Install gcc / g ++:
sudo apt-get install build-essential
报错:

解决方法:
the Add-APT-Repository the sudo PPA: jonathonf / GCC 
the sudo APT-GET Update 
(if you can not add: 
the sudo the Add-APT-Repository PPA: the toolchain-R & lt Ubuntu-/ Test 
the sudo APT-GET Update)

 add-apt-repository installation:

sudo apt-get install software-properties-common
sudo apt-get update

./build.sh install // will install the header files and static library files to ../build/release-install/{include,lib} 

 

Library use:

 

 

 








Guess you like

Origin www.cnblogs.com/GuoXinxin/p/11231781.html