I would like to install the older version of Google Protocol Buffers (protobuf-2.4.1) on mac using Terminal command line. I tried with brew install protobuf
, but the latest version 2.5.0 has been installed. Is it possible to install the older version from terminal.
Thanks
From https://github.com/paulirish/homebrew-versions-1 . Works for me!
you can install from official link page provided by google http://google.github.io/proto-lens/installing-protoc.html
It's a new year and there's a new mismatch between the version of
protobuf
in Homebrew and the cutting edge release. As of February 2016,brew install protobuf
will give you version 2.6.1.If you want the 3.0 beta release instead, you can install it with:
There are some issues with building protobuf 2.4.1 from source on a Mac. There is a patch that also has to be applied. All this is contained within the homebrew protobuf241 formula, so I would advise using it.
To install protocol buffer version 2.4.1 type the following into a terminal:
If you already have a protocol buffer version that you tried to install from source, you can type the following into a terminal to have the source code overwritten by the homebrew version:
Check that you now have the correct version installed by typing:
It should display 2.4.1
This is not via brew, but the end result is the same.
Steps 4-7 are from the README.txt file from the protobuf tarball.
For some reason I need to use protobuf 2.4.1 in my project on OS X El Capitan. However homebrew has removed protobuf241 from its formula. I install it according @kksensei's answer manually and have to fix some error during the process.
During the make process, I get 3 error like following:
(Sorry, I dont know how to attach code when the code contains '`' )
If you get the same error, please edit src/google/protobuf/message.cc, add
#include <istream>
at the top of the file and do$ make
again and should get no errors. After that do$ sudo make install
. When install finished$protoc --version
should display the correct result.