Error installing protobuf on mac.

428 views
Skip to first unread message

Mohit Jain

unread,
May 13, 2015, 11:13:12 AM5/13/15
to caffe...@googlegroups.com
Hello,
    I've been trying to install Caffe for about 5 days now and still seem to have made very less progress :( . Currently, I am stuck with this error on running the command to install protobuf. Im installing with anaconda (since hdf5 is already added to it).

brew install --build-from-source --with-python --fresh -vd protobuf

The installation fails here with the error message 'failed to execute: python'. 

==> python -c import setuptools... --no-user-cfg install --prefix=/private/var/folders/85/ggnvfyt127s14gfwf_q7g7100000gn/T/protobuf20150513-29320-tvtmue/protobuf-2.6.1/homebrew --single-version-externally-managed --record=installed.txt
Failed to execute: python
/usr/local/Library/Homebrew/debrew.rb:11:in `raise'
BuildError: Failed executing: python -c import\ setuptools,\ tokenize
__file__\ =\ 'setup.py'
exec(compile(getattr(tokenize,\ 'open',\ open)(__file__).read()
\ \ .replace('\r\n',\ '\n'),\ __file__,\ 'exec'))
 --no-user-cfg install --prefix=/private/var/folders/85/ggnvfyt127s14gfwf_q7g7100000gn/T/protobuf20150513-29320-tvtmue/protobuf-2.6.1/homebrew --single-version-externally-managed --record=installed.txt
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action:

To which, if I select the option 'raise', the following is the output.

==> python -c import setuptools... --no-user-cfg install --prefix=/private/var/folders/85/ggnvfyt127s14gfwf_q7g7100000gn/T/protobuf20150513-29320-tvtmue/protobuf-2.6.1/homebrew --single-version-externally-managed --record=installed.txt
Failed to execute: python
python -c import setuptools... --no-user-cfg install --prefix=/private/var/folders/85/ggnvfyt127s14gfwf_q7g7100000gn/T/protobuf20150513-29320-tvtmue/protobuf-2.6.1/homebrew --single-version-externally-managed --record=installed.txt
Failed to execute: python
/usr/local/Library/Homebrew/debrew.rb:11:in `raise'
BuildError: Failed executing: python -c import\ setuptools,\ tokenize
__file__\ =\ 'setup.py'
exec(compile(getattr(tokenize,\ 'open',\ open)(__file__).read()
\ \ .replace('\r\n',\ '\n'),\ __file__,\ 'exec'))
 --no-user-cfg install --prefix=/private/var/folders/85/ggnvfyt127s14gfwf_q7g7100000gn/T/protobuf20150513-29320-tvtmue/protobuf-2.6.1/homebrew --single-version-externally-managed --record=installed.txt
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action: raise
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
==> Formula
Path: /usr/local/Library/Formula/protobuf.rb
==> Configuration
HOMEBREW_VERSION: 0.9.5
HEAD: 74b1031a447beb24ee1bc5ba092e2a3836a9b63b
Last commit: 11 days ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.10.2-x86_64
Xcode: N/A
CLT: 6.3.1.0.1.1429149539
Clang: 6.1 build 602
MacPorts/Fink: /opt/local/bin/port
X11: 2.7.6 => /opt/X11
System Ruby: 2.0.0-p481
Perl: /usr/bin/perl
Python: /Users/Home/Packages_and_Libraries/anaconda/bin/python => /Users/Home/Packages_and_Libraries/anaconda/bin/python2.7
Ruby: /usr/bin/ruby
Java: 1.8.0_31
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
CXXFLAGS: -DNDEBUG
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.10
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/bin:/bin:/usr/sbin:/sbin

Error: protobuf 2.6.1 did not build
Logs:
     /Users/Home/Library/Logs/Homebrew/protobuf/01.configure
     /Users/Home/Library/Logs/Homebrew/protobuf/01.configure.cc
     /Users/Home/Library/Logs/Homebrew/protobuf/02.make
     /Users/Home/Library/Logs/Homebrew/protobuf/02.make.cc
     /Users/Home/Library/Logs/Homebrew/protobuf/03.make
     /Users/Home/Library/Logs/Homebrew/protobuf/04.python
     /Users/Home/Library/Logs/Homebrew/protobuf/config.log

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:878:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:878:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:878:in `block in connect'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:877:in `connect'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:851:in `start'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:313:in `open_http'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:709:in `buffer_open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:210:in `block in open_loop'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:208:in `catch'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:208:in `open_loop'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:149:in `open_uri'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:689:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open-uri.rb:30:in `open'
from /usr/local/Library/Homebrew/utils.rb:354:in `open'
from /usr/local/Library/Homebrew/utils.rb:384:in `issues_matching'
from /usr/local/Library/Homebrew/utils.rb:412:in `issues_for_formula'
from /usr/local/Library/Homebrew/exceptions.rb:145:in `fetch_issues'
from /usr/local/Library/Homebrew/exceptions.rb:141:in `issues'
from /usr/local/Library/Homebrew/exceptions.rb:184:in `dump'
from /usr/local/Library/brew.rb:167:in `rescue in <main>'
from /usr/local/Library/brew.rb:65:in `<main>'

Im really struggling to get Caffe running on my Mac OS X 10.10.2. Any help in this regard would be highly appreciated.

Regards,
Mohit

Charles Prado

unread,
Dec 2, 2015, 10:27:42 AM12/2/15
to Caffe Users
Same error here. Did you solved it?

Mohit Jain

unread,
Dec 2, 2015, 11:05:25 AM12/2/15
to Charles Prado, Caffe Users
Yes. I couldn't sideline my exact problem, however, I wrote a small blog with the step-by-step process to install caffe. Hope it helps. :)

Regards,
Mohit

--
You received this message because you are subscribed to a topic in the Google Groups "Caffe Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/caffe-users/firgf8--2V8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/94a63009-aa2b-4141-99fe-aef8c6b8b33d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wilfred Denton

unread,
Feb 2, 2016, 4:02:55 PM2/2/16
to Caffe Users, chr...@gmail.com
I tried following your blog post but I'm getting the exact same error that you posted above when I try to install protobuf. How did you get around this?

Mohit Jain

unread,
Feb 3, 2016, 3:31:36 AM2/3/16
to Wilfred Denton, Caffe Users, chr...@gmail.com
Hi,
   As I mentioned earlier, I wasn't able to sideline the problem as such... However, A fresh start got me through. What I would suggest you do is remove all installed dependencies for this task, restart your machine and then follow the steps for installation... It might have been a problem of stray environment variables now that I think of it. Wouldn't be able to help much after that though :/ Hope you get through with this approach.

Regards,
Mohit

Wilfred Denton

unread,
Feb 4, 2016, 12:15:01 PM2/4/16
to Mohit Jain, Caffe Users, chr...@gmail.com
Thanks for the response Mohit. I will try and do a fresh install.
Reply all
Reply to author
Forward
0 new messages