Protobuf: Protobuf 2.6.0 error: tar: Unrecognized archive format

Created on 18 Nov 2016  路  7Comments  路  Source: protocolbuffers/protobuf

I cannot install the Protobuf 2.6.0, detail as below:

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.

Most helpful comment

It's not a good idea. We have 3 more projects and all of them develop with protobuf 2, so it's not easy to upgrade. Anyway, I've found how to install the protobuf-2.6.1 for my Mac:

  1. run command 'brew install protobuf' to install the protobuf, the version of protobuf should be 3.1.0;
  2. download the protobuf-2.6.1: https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.bz2
  3. Uncompress and cd to the protobuf-2.6.1 folder:
./autogen.sh

./configure

make

make install

*4. download the protobuf-objc and build(only for oc):

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

cd protobuf-objc

./scripts/build.sh
  1. Try command 'protoc --version' in the terminal, if the protobuf version is showing, means all finished, else please re-do the step 3 and 4.

Wish can help someone, thanks!

All 7 comments

I need the proto2, and the 2.6.1 cannot be find by 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.

Please use protobuf 3.1.0 release instead. Protobuf 3.x supports both proto2 and proto3 and it's wire compatible with old 2.x versions.

The old link in protobuf-2.6.0/autogen.sh no longer works because google code site has been shutdown. You can download the latest versions here:
https://github.com/google/protobuf/releases/tag/v3.1.0

It's not a good idea. We have 3 more projects and all of them develop with protobuf 2, so it's not easy to upgrade. Anyway, I've found how to install the protobuf-2.6.1 for my Mac:

  1. run command 'brew install protobuf' to install the protobuf, the version of protobuf should be 3.1.0;
  2. download the protobuf-2.6.1: https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.bz2
  3. Uncompress and cd to the protobuf-2.6.1 folder:
./autogen.sh

./configure

make

make install

*4. download the protobuf-objc and build(only for oc):

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

cd protobuf-objc

./scripts/build.sh
  1. Try command 'protoc --version' in the terminal, if the protobuf version is showing, means all finished, else please re-do the step 3 and 4.

Wish can help someone, thanks!

thanks. this worked

Thanks @gaoshanyu

It worked thank you so much! @gaoshanyu

Was this page helpful?
0 / 5 - 0 ratings