Installing Metasploit Framework on OS X Yosemite (Updated April 2015)

EDIT: The installation guide for OSX El Capitan can be found here:

This Guide is adapted from Carlos Perez’s Blog ( (which is a must read) with some additions and fixes to make the setup work on OS X Yosemite. This post should help to alleviate some common issues with installing ruby and the Metasploit Framework on OS X. The main issues being that OS X ships with a newer version of Ruby that is not compatible with Metasploit and the version of libiconv installed with OS X causes issues installing the Nokogiri gem.

Xcode and Command Line Development Tools

The first step is to ensure that Software Update has been run and that OS X is updated. Once OS X has been updated, It is time to install Xcode.

Mac App Store – Xcode

Once Xcode has been installed launch Xcode from Applications and agree to the SDK License Agreement.

Install Xcode developer tools  by typing:

xcode-select --install

Click … read more