专业的编程技术博客社区

网站首页 > 博客文章 正文

安装Protoc(安装PROE后运行慢是什么原因)

baijin 2024-10-21 03:36:26 博客文章 9 ℃ 0 评论

一、通过包管理器安装

Linux, 使用 apt 或者 apt-get

$ apt install -y protobuf-compiler
$ protoc --version # Ensure compiler version is 3+

MacOS, 使用 Homebrew:

$ brew install protobuf
$ protoc --version # Ensure compiler version is 3+

二、通过预编译二进制安装,适合所有操作系统

1、手动下载适合操作系统和计算机架构的压缩包 (protoc-<version>-<os><arch>.zip)

下载地址:https://github.com/protocolbuffers/protobuf/releases

Windows:protoc-3.20.1-win64.zip

macOS:protoc-3.20.1-osx-x86_64.zip

Linux:protoc-3.20.1-linux-x86_64.zip

2、解压文件到$HOME/.local,或者其他目录

$ unzip protoc-3.20.1-linux-x86_64.zip -d $HOME/.local

3、更新环境变量PATH,添加 protoc 可执行文件所在的目录bin

$ export PATH="$PATH:$HOME/.local/bin"

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表