2016-11-18 109 views
0

我无法安装的Protobuf 2.6.0,细节如下:的Protobuf 2.6.0响应错误无法识别的归档格式

ryous-MacBook-Pro:~ raniys$ protoc --version 
libprotoc 2.6.0 
ryous-MacBook-Pro:~ raniys$ cd /Users/raniys/Downloads/protobuf-2.6.0 
ryous-MacBook-Pro:protobuf-2.6.0 raniys$ ./autogen.sh 
Google Test not present. Fetching gtest-1.5.0 from the web... 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 1586 100 1586 0  0 2948  0 --:--:-- --:--:-- --:--:-- 2953 
tar: Unrecognized archive format 
tar: Error exit delayed from previous errors. 

的protobuf的2.6.1无法通过BREW发现:

ryous-MacBook-Pro:~ raniys$ brew install protobuf261 
Error: No available formula with the name "protobuf261" 
==> Searching for similarly named formulae... 
Error: No similarly named formulae found. 
==> Searching taps... 
Error: No formulae found in taps. 

的MacOS版本:10.12.1 自制1.0.8

感谢好心帮。

回答

0

我已经解决了这一点,下面是从link副本:

  1. 运行命令“酿造安装protobuf的”安装protobuf的,protobuf的版本应该是3.1.0;
  2. 的protobuf的-2.6.1下载:
    https://github.com/google/protobuf/releases/download/v2.6.1/protobuf- 2.6.1.tar.bz2
  3. 解压缩和CD到的protobuf-2.6.1文件夹:
./autogen.sh 

./configure 

make 

make install 

* 4。下载的protobuf-objc和构建(仅用于OC):

git clone https://github.com/alexeyxo/protobuf-objc.git 

cd protobuf-objc 

./scripts/build.sh 
在终端
  • 尝试命令 'protoc --version',如果protobuf的版本是显示,表示全部完成,否则请重新执行步骤3和4.
  • 0

    2.6.0源代码tarball只是旧的,试图获取不再存在的链接。我建议升级到更新的版本,如3.1,除非你有特别的理由坚持使用2.6.0。

    相关问题