apt install
apt install gcc
apt install g++
apt install cmake
apt install openssl
apt install libssl-dev
apt install libcurl4-openssl-dev
apt install libboost-all-dev
install from source
install llvm 11
https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/llvm-11.0.0.src.tar.xz
tar xf llvm-11.0.0.src.tar.xz
cd llvm-11.0.0.src
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . -j
cmake --build . --target install
boost
如果不想使用 apt install libboost-all-dev,也可以下载source 编译安装 wget https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.gz
protobuf
https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protobuf-all-3.13.0.tar.gz
follow https://github.com/protocolbuffers/protobuf/blob/main/src/README.md
tar -zxvf protobuf-all-3.13.0.tar.gz
cd protobuf-3.13.0/
./autogen.sh
./configure
make -j
#make check
make install
ldconfig # refresh shared library cache.
make check 的目的是看看有没有error。可省略,输出如下
PASS: protobuf-test
PASS: protobuf-lazy-descriptor-test
PASS: protobuf-lite-test
PASS: google/protobuf/compiler/zip_output_unittest.sh
PASS: google/protobuf/io/gzip_stream_unittest.sh
PASS: protobuf-lite-arena-test
PASS: no-warning-test
============================================================================
Testsuite summary for Protocol Buffers 3.13.0
============================================================================
# TOTAL: 7
# PASS: 7
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: Leaving directory '/home/shen/software/protobuf-3.13.0/src'
make[2]: Leaving directory '/home/shen/software/protobuf-3.13.0/src'
make[1]: Leaving directory '/home/shen/software/protobuf-3.13.0/src'
|