cjrpwq
Last Updated: February 25, 2016
·
1.817K
· kennethjohnbalgos

Setup Macbook for Developer

XCode:

  • Update to the latest XCode 4.4 from the App Store
  • Install the Command Line Tools
  • Of course, since it is zero-day, there was an issue fetching the Command Line Tools from the server and I had to install manually from a .pkg file retrieved from the Apple Developer Portal. If you install the CLI tools package manually, you may need to run this to accept the license terms system-wide:

    sudo xcodebuild -license

MacPorts

  • First, you'll need to update the base MacPorts installation:

    sudo port -v selfupdate

  • If you run in to a compilation error, you may need to edit the file /opt/local/etc/macports/macports.conf and set the developer_diroption to be empty:

    sudo vim /opt/local/etc/macports/macports.conf

  • Directory containing Xcode Tools (default is to ask xcode-select)

    developer_dir /Developer

    developer_dir

  • You should now be able to update any outdated ports (grab a beverage while you wait):

    sudo port -vu upgrade outdated

GCC 4.2

  • Now install the apple-gcc42 port to replace the missing GCC 4.2 in Mountain Lion:

    sudo port install -vu apple-gcc42

  • Once that has been installed, you will need to link it to the expected system location:

    sudo ln -s /opt/local/bin/gcc-apple-4.2 /usr/bin/gcc-4.2

RVM

  • Make sure you have the latest RVM version installed:

    curl -L https://get.rvm.io | bash -s stable

10 Responses
Add your response

4698

My only suggestion would be to give homebrew a go...I found it better then MacPorts

over 1 year ago ·
4705

@mdeiters Sorry I can't tip/suggest homebrew because I haven't used that tool yet. I might be wrong if I write procedures I haven't tested yet. But thanks to you feedback, I appreciate it. :)

over 1 year ago ·
4727
4729

@kennethjohnbalgos I can't more +1 this request ;)

over 1 year ago ·
4730

@mikhailov That's cool but it saw it configure advance tools. That saves a lot of time but not suitable for beginners. Thanks!

over 1 year ago ·
4737
4739

When you set up a new Mac, try to do it with boxen from Github! And +1 for homebrew :3

over 1 year ago ·
6824

@kennethjohnbalgos you really need to try Homebrew. It's awesome: simples, configurable and it works. You don't need to install all XCode. Just Command Line Tools might works.

over 1 year ago ·
6825

Hi @hlegius :) Thanks for your suggestion. I'm already using homebrew, the "brew doctor" command is great :p

over 1 year ago ·
7492

MacPorts? I thought MacPorts was dead...

over 1 year ago ·