手動安裝通訊協定緩衝區 (protobuf) 的步驟
- ran install_prerequisites.sh 腳本。
- 收到錯誤:
"/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libprotobuf.a(arena.o): relocation R_X86_64_TPOFF32 against hidden symbol `_ZN6google8protobuf5Arena13thread_cache_E' can not be used when making a shared object
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libprotobuf.a(descriptor.o): relocation R_X86_64_PC32 against symbol `_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED1Ev' can not be used when making a shared object; recompile with -fPIC
手動安裝protobuf:
sudo apt-get install autoconf automake libtool curl make g++ unzip -y
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig