Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'd like to install gcc and make on my Macbook Air, but I don't have root access on it. I found this link through searching on google, but I have no idea how to set up the prefix's so that the actual gcc executable can find the libraries. I have a directory set up with node.js and git installed at ~/usr/local and I'd like to install GCC there also. I have no idea where to start with make. Can anyone help? :D

share|improve this question

2 Answers 2

If you don't have administrator access to your machine, you are still be able to install pre-compiled binary software inside your home directories. Create a folder in your home directory called usr and a directory inside that one called bin, if you want to match the standard directory structure of where make and gcc usually reside.

you can find a gnu make binary for os x here

about make

you can find a download link for a gcc binary for os x here

about gcc

Using these tools successfullly without sudo (admin or root) access is altogether another thing... and you didn't ask about that, and I can't answer that, anyway. It seems like it would be easier to gain admin access through various methods available on the web than to try to build software without admin access. But this, of course, is not part of your question. Best of luck!

(and FYI, I'm pretty sure Brew requires xcode, and if you can get xcode installed, brewnistas enthusiam for Brew notwithstanding, MacPorts is far far more resiliant and mature than Brew)

share|improve this answer

The best way to install the gcc toolchain without using Apple's command line tools is to use Homebrew.

After installing Homebrew then

brew tap homebrew/versions && brew install apple-gcc49
brew link --force apple-gcc49
ln -nsf $(which gcc-4.9) /usr/bin/gcc-4.9

should have you working.

You can find more details here: http://new-bamboo.co.uk/blog/2013/10/24/3-quick-tips-for-coding-with-os-x-10-9-mavericks

Note that the gcc toolchain includes make.

share|improve this answer
    
This still needs root access –  Mark May 3 at 15:14
    
No it doesn't. It requires that you are a member of the 'admin' group or you install Homebrew in somewhere you have write access such as '~/usr/local' - neither of which is 'root access' –  Tony Williams May 6 at 10:34
    
Sorry I was sloppy re root access (as I think the question was) I meant sudo etc - but the install localally should be in in the answer –  Mark May 6 at 10:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.