cjrpwq
Last Updated: February 25, 2016
·
1.794K
· kennethjohnbalgos
0c9356450f2180d2981d9b98f64d065e

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

Say Thanks
Respond

10 Responses
Add your response

4698
12003957 10206752435102297 2524621803006121539 n

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

over 1 year ago ·
4705
0c9356450f2180d2981d9b98f64d065e

@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
Screen shot 2016 02 29 at 20.33.18
over 1 year ago ·
4729
Img 1751

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

over 1 year ago ·
4730
0c9356450f2180d2981d9b98f64d065e

@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
D7a65757a1349aa853f819a1c98c01e7
over 1 year ago ·
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
9be98dfa0cab54033aebb909a5d1df84

@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
0c9356450f2180d2981d9b98f64d065e

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

over 1 year ago ·
7492
Fa4b5f21ddfec459b530bfce99079e54

MacPorts? I thought MacPorts was dead...

over 1 year ago ·