To compile our own software, we need to install the Command Line Tools from Apple. Alternatively, you could install Xcode — Apple's complete development environment for OS X. Xcode is available as a free download from the Mac App Store.
First, launch Terminal from Applications ➤ Utilities.
Install the Command Line Tools. This will initiate the installer. Follow the on-screen instructions.
To verify that the Command Line Tools are installed.
This command displays the location where your developer tools are installed.
Once you have the developer tools installed, you are ready to begin installing your own custom built packages.