Create a gist now

Instantly share code, notes, and snippets.

@mikepurvis /gist:9837958 Secret
Last active Feb 15, 2017

What would you like to do?
ROS Indigo on Mavericks/Yosemite (Homebrew with brewed Python)

ROS on Mac OS X

These instructions have been supplanted by an automated, scripted installer, which lives here:

Please try it out, and file bugs as required. Feel free to browse past versions of this gist as a historical curiosity, but I won't be monitoring or supporting it any more.

rasit commented Jun 3, 2014

It seems one step is missing, because the second last step "catkin ..." fails with "catkin: command not found". Any comments? Are there any assumptions before proceeding with this script?


kpykc commented Jun 12, 2014

In my case, i also installed manually:

brew install opencv --with-qt --with-eigen --with-tbb
brew install lz4

Brew has Ogre 1.7 by default, rviz uses Ogre 1.8, so i got a fault first time. You need to install Ogre from HEAD:

brew install ogre --HEAD

Well, i'm building it now, so i'm not sure if this will be the only issue, even if it will help.


cd src/robot_state_publisher
curl | patch -p1
cd ..
rm -r build_isolated /robot_state_publisher

cd src/robot_model
curl | patch -p1
cd ..
rm -r build_isolated/kdl_parser

Other: add to src/geometry/tf/CMakeLists.txt


./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release

mikepurvis commented Aug 8, 2014

@rasit Yes, I have added catkin_tools to the pip install, among other changes.

@kpykc The geometry changes are no longer necessary. Due to segfault issues with Ogre 1.9, the current version of the directions uses Hydro's rviz.

Doing rosinstall_generator rviz --rosdistro hydro --tar >> indigo.rosinstall doesn't work in my case. I still have the "could not serialize mesh" error.

My solution has been to manually fetch rviz from github and change the branch to hydro. Also, since rosinstall_generator desktop already pulls in rviz, doesn't the second line create a conflict?

It seems Mavericks does not have these paths:
" -DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib

I tried searching for the above dylib as well and was unable to find it


mikepurvis commented Nov 25, 2014

@soulslicer This recipe is using brewed Python; those paths only exist assuming you have installed Python using Homebrew, and that your Homebrew install is in the standard location.

Juxi commented Dec 23, 2014

when doing the catkin command for building/installing I get the following error:
catkin: error: unrecognized arguments: --install --install-space


mikepurvis commented Jan 21, 2015

@Juxi The command line interface for catkin_tools changed slightly. I've updated the gist accordingly.

I've also switched this to be a desktop_full install, which seems to work well for me.

On a completely new install of Yosemite (hard drive wipe) in Jan 2015 I did the following for Indigo:

I had to manually install pydot with the -H flag:

sudo -H pip install -U pydot

After rosdep install completed, I still had to run

pip install empy

pgorczak commented Feb 5, 2015

Thanks for the recipe.
It seems like the location of brew recently changed to
ruby -e "$(curl -fsSL"


mikepurvis commented Feb 6, 2015

@davetcoleman, it's odd to me that pydot would require a manual installation— it's clearly in the rosdep index. Is it rqt_graph, or is there some other package you're thinking should have the dependency?


mikepurvis commented Mar 16, 2015

Now installing on my Yosemite machine. A few other updates including changing the paths for Python 2.7.9, using skip-keys and as-root in the rosdep invocation, and adding sphinx to the upfront pip install (for the sake of a homebrew dependency).

giogadi commented Mar 18, 2015

Thanks for this Gist! I'm trying to build on Yosemite.

I almost made it to the end with no problems, but I got an error when trying to build rviz:

[rviz] ==> '/Users/luis/indigo_desktop_ws/build/rviz/ /usr/bin/make -j4 -l4' in '/Users/luis/indigo_desktop_ws/build/rviz'
[  0%] Generating moc_tool_properties_panel.cxx
[  0%] Generating moc_display.cxx
[  1%] Generating moc_displays_panel.cxx
[  1%] Generating moc_failed_panel.cxx
[  1%] Generating moc_frame_manager.cxx
[  2%] Generating moc_frame_position_tracking_view_controller.cxx
[  2%] Generating moc_help_panel.cxx
[  2%] Generating image/moc_image_display_base.cxx
[  2%] Generating moc_loading_dialog.cxx
[  3%] Generating moc_message_filter_display.cxx
usr/local/Cellar/boost/1.57.0/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"
make[2]: *** [src/rviz/moc_message_filter_display.cxx] Error 1
make[1]: *** [src/rviz/CMakeFiles/rviz.dir/all] Error 2
make: *** [all] Error 2
make: INTERNAL: Exiting with 5 jobserver tokens available; should be 4!                                                                                                              
[rviz] <== '/Users/luis/indigo_desktop_ws/build/rviz/ /usr/bin/make -j4 -l4' failed with return code '2'

It looks like this is an issue that's fixed in indigo-devel; is this happening because we're using hydro's rviz?


mikepurvis commented Mar 19, 2015

Yes, I think so. I've updated to use the new ogre-1.9 formula from @wjwwood, so Indigo's rviz now works.

giogadi commented Mar 22, 2015

I'm trying the new version, and at the rosdep install step, it's still trying to install ogre-1.7 even though I've already installed ogre-1.9. This causes homebrew to error out because of conflicting files in the two installs. Should rosdep install be trying to install ogre-1.7? I'm using --skip-keys=ogre gazebo as in the gist.

kjeremy commented Apr 2, 2015

@mikepurvis I'm having the same issue as @giogadi where it's still trying to install ogre-1.7

@giogadi and @kjeremy, I think I might be having the same issue, but explicitly, I get the following error:

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
rviz: Missing resource ogre

fferri commented Apr 19, 2015

it fails with Xcode 6.3 / Xcode CLT 6.3. I had to downgrade to 6.2 (fails compilation of roscpp and several other packages in the catkin build last step)

fferri commented Apr 19, 2015

also: if the "pip install -U ..." step fails, try first to do "pip install -U pip", then "pip install -U setuptools", and then repeat the pip install step with all arguments

fferri commented Apr 19, 2015

also: I don't know if this was related to the issue introduced by Xcode 6.3, but that recipe for ogre used to fail on my machine. I ended up doing:

sed -i -e 's/aa9b0c6d371802e0535515758e88c4893045cd5f/45535a9f5a1e462965cf999e222f0b86c3ef679c/g' ogre1.9.rb
brew install ogre1.9.rb --devel
brew install

(but I didn't check if it worked correctly after downgrading to Xcode 6.2)

csik commented Apr 30, 2015

Thank you so much for sharing, worked like a charm on 10.10.3. Wish I'd found this a day or two ago!
One modification, this patch:
... then a fresh catkin build.

cm85 commented May 8, 2015


Thanks a lot for this gist and for sharing all the tricks!
Here is what I needed to do for indigo under 10.10.3:

  • I downgraded to xcode command line tools 6.2, since I wanted to have gazebo5
  • pcl_ros did not find glew, altough it was installed through homebrew. This did the trick: PointCloudLibrary/pcl#1133

rhellman commented Jun 9, 2015

Thank you for posting!
@markusachtelik are you able to launch rviz? I can't figure out why rviz keeps crashing.

sorry, did not get a notification for this -- rviz runs fine. I however haven't done much more than showing tf frames so far.

Agachon commented Jun 21, 2015

Thanks for you posting !
I tried to install ROS on my yosemite (10.10.3) on clean system but I have an error during
"brew install".
Here is the link to gist error
Can you help me please ?

walaino commented Jul 11, 2015

@mikepurvis I'm installing the ros on my OS X Yosemite 10.10.4, the python version is now 2.7.10
I went through the path in my computer and now it's 2.7.10_1,

catkin build

but it still not working. The step fails at [106 out of 224] where the Python.h is not found.

Referring to you comment at mar 17 "Now installing on my Yosemite machine. A few other updates including changing the paths for Python 2.7.9, using skip-keys and as-root in the rosdep invocation, and adding sphinx to the upfront pip install (for the sake of a homebrew dependency). "

can you guide me on how to fix it?


mikepurvis commented Jul 15, 2015

Hi all,

I don't get notifications of new comments on this gist, so I apologize for the non-timely responses. I've reverted the instruction to use Ogre 1.9, as this still seems to cause problems— it's easier still, I think, to stick to Ogre 1.7 and the rviz from ROS Hydro. I'll be switching this guide over to Jade at some point, which I think has a slightly cleaner story for this stuff.

I've also scripted the Python path discovery, so that should be a little more automatic going forward.

Hi all! Finally 2 weeks later, i've successfully installed ROS with RVIZ.

I'm on a mac early 2011 with OS X 10.10.4, I did what @markusachtelik said.
Remove Xcode 6.3 and downgrade to 6.2, then run the script.

Now, my problem is that all the packages are continue in the /src folder, can I move them to any other folder? Because I can be waiting more than 45 minutes every time that I make a new change.

Thank you very much! (:

can you help me :

Scanning dependencies of target pointcloud_to_pcd
[ 26%] Building CXX object CMakeFiles/pointcloud_to_pcd.dir/tools/pointcloud_to_pcd.cpp.o
[ 30%] Linking CXX executable /Users/Ghernati_Amine/indigo_desktop_full_ws/devel/lib/pcl_ros/convert_pcd_to_image
[ 30%] Linking CXX executable /Users/Ghernati_Amine/indigo_desktop_full_ws/devel/lib/pcl_ros/pcd_to_pointcloud
ld: library not found for -lvtkRenderingFreeTypeOpenGL
ld: library not found for -lvtkRenderingFreeTypeOpenGL
clangclang: : errorerror: : linker command failed with exit code 1 (use -v to see invocation)linker command failed with exit code 1 (use -v to see invocation)

make[2]: make[2]: * [/Users/Ghernati_Amine/indigo_desktop_full_ws/devel/lib/pcl_ros/convert_pcd_to_image] Error 1* [/Users/Ghernati_Amine/indigo_desktop_full_ws/devel/lib/pcl_ros/pcd_to_pointcloud] Error 1

make[1]: *** [CMakeFiles/pcd_to_pointcloud.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/convert_pcd_to_image.dir/all] Error 2
[ 31%] Linking CXX executable /Users/Ghernati_Amine/indigo_desktop_full_ws/devel/lib/pcl_ros/convert_pointcloud_to_image
ld: library not found for -lvtkRenderingFreeTypeOpenGL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/Ghernati_Amine/indigo_desktop_full_ws/devel/lib/pcl_ros/convert_pointcloud_to_image] Error 1
make[1]: *** [CMakeFiles/convert_pointcloud_to_image.dir/all] Error 2
[ 33%] Linking CXX executable /Users/Ghernati_Amine/indigo_desktop_full_ws/devel/lib/pcl_ros/pointcloud_to_pcd
ld: library not found for -lvtkRenderingFreeTypeOpenGL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/Ghernati_Amine/indigo_desktop_full_ws/devel/lib/pcl_ros/pointcloud_to_pcd] Error 1
make[1]: *** [CMakeFiles/pointcloud_to_pcd.dir/all] Error 2
make: *** [all] Error 2
[pcl_ros] <== '/Users/Ghernati_Amine/indigo_desktop_full_ws/build/pcl_ros/ /usr/bin/make --jobserver-fds=3,4 -j' failed with return code '2'

Failed <== pcl_ros [ 26.3 seconds ]
Finished <== gazebo_ros [ 1 minute and 39.5 seconds ]
[build] There were '1' errors:

Failed to build package 'pcl_ros' because the following command:

Command to reproduce:

cd /Users/Ghernati_Amine/indigo_desktop_full_ws/build/pcl_ros && /Users/Ghernati_Amine/indigo_desktop_full_ws/build/pcl_ros/ /usr/bin/make --jobserver-fds=3,4 -j; cd -

Path to log:

cat /Users/Ghernati_Amine/indigo_desktop_full_ws/build/build_logs/pcl_ros.log

Exited with return code: 2

[build] Runtime: 27 minutes and 0.7 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment