centos 7.2 gflags glog protobuf gperftools 配置


一、libunwind 安裝 (64位系統需要)
1、libunwind-1.1.tar.gz
2、安裝步驟
$ tar xzf 1、libunwind-$version-source.tar.gz
$ cd 1、libunwind-$version
$ ./configure && make && make install

二、gflags 安裝
1、gflags-2.1.2.tar.gz  cmake-3.7.2.tar.gz
2、安裝步驟

#如未安裝 cmake ,請先安裝,反之略過。

$ tar xzf cmake-$version.tar.gz
$ cd cmake-$version
$ ./configure && make && make install

$ tar xzf gflags-$version-source.tar.gz
$ cd gflags-$version
$ mkdir build && cd build
$ ccmake ..

- Press 'c' to configure the build system and 'e' to ignore warnings.
- Set CMAKE_INSTALL_PREFIX and other CMake variables and options.
- Continue pressing 'c' until the option 'g' is available.
- Then press 'g' to generate the configuration files for GNU Make.

$ make
$ make test (optional)
$ make install (optional)

3、如果要安裝glog 則ccmake 時需要配置加入-fPIC,否則glog 編譯不過,會提示gflags.a -fPIC相關錯誤
CMAKE_CXX_FLAGS -fPIC
CMAKE_C_FLAGS -fPIC

三、glog 安裝
1、glog-0.3.4.tar.gz
2、安裝步驟
$ tar xzf glog-$version-source.tar.gz
$ cd glog-$version
$ ./configure && make && make install

四、protobuf 安裝
1、protobuf-2.6.1.zip
2、安裝步驟
$ unzip protobuf-$version-source.zip
$ cd protobuf-$version
$ ./configure && make && make install

五、gperftools 安裝
1、gperftools-2.5.tar.gz
2、安裝步驟
$ tar xzf gperftools-$version-source.tar.gz
$ cd gperftools-$version
$ ./configure && make && make install

六、scons 安裝 (和cmake 類似功能,使用python語言)
1、scons-2.4.1-1.noarch.rpm
2、安裝步驟(python已安裝)
$ rpm -ivh scons-2.4.1-1.noarch.rpm

七、其他
/etc/ld.so.conf中加入/usr/local/lib這一行,保存之后,再運行:/sbin/ldconfig –v


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM