[Goal]

  • Dependency가 다른 boost version을 알맞게 설치할 수 있다.

[Reference Site]


[Process]

$ tar -zxvf boost_1_65_1.tar.gz
$ cd boost_1_65_1/
$ ./bootstrap.sh --prefix=/usr/local
$ sudo ./b2 --prefix=/usr/local --with=all --install
    • 특정 라이브러리만 설치하고 싶으면 `sudo ./b2 --prefix=/usr/local --with-python --with-regex --install` 등등 이렇게 뒤에 붙여주면 됨
    • 전체 라이브러리를 설치하고 싶으면 `sudo ./b2 --prefix=/usr/local --with=all --install` 만 해주면됨
  • [Step 3] Check Boost version correctly 
$ cat /usr/local/include/boost/version.hpp | grep "BOOST_LIB_VERSION"
//  BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
#define BOOST_LIB_VERSION "1_65_1"

[Change Boost version]

  • [Step 1] Boost package를 download하기 전에 기존의 boost와 관련된 라이브러리 모두 제거 후 위의 과정을 다시 진행
$ sudo apt-get -y --purge remove libboost-all-dev libboost-doc libboost-dev
$ sudo rm -r /usr/lib/x86_64-linux-gnu/libboost_*

[Boost Install Error about libboost_python]

+ Recent posts