安装protobuf及ncnn和cpp_redis

本文详细介绍了在Ubuntu和Debian环境下使用protobuf官方方法安装protobuf库的步骤,包括必要的依赖包安装、源码克隆、子模块更新、配置、编译、检查和安装。此外,还提供了ncnn的安装流程,强调了需先安装protobuf。同时,给出了cpp_redis库的官方安装指导,涵盖项目克隆、子模块初始化、构建目录创建、Makefile生成、库编译和安装等关键环节。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

protobuf官方方法
ubuntu && debian

sudo apt-get install autoconf automake libtool curl make g++ unzip
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig # refresh shared library cache.

验证 protoc --version

ncnn(必须先装protobuf)

git clone https://github.com/Tencent/ncnn.git
cd ncnn
mkdir build && cd build
cmake ..
make
make install

cpp_redis官方方法Linux下

# Clone the project
git clone https://github.com/Cylix/cpp_redis.git
# Go inside the project directory
cd cpp_redis
# Get tacopie submodule
git submodule init && git submodule update
# Create a build directory and move into it
mkdir build && cd build
# Generate the Makefile using CMake
cmake .. -DCMAKE_BUILD_TYPE=Release
# Build the library
make
# Install the library
make install
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值