Question: I've been using mamp for a while now and everything has been working great. Then today I go to start it up and mamp alert tells me that apache is already running on that port and to pick another one. So without starting mamp, I type in local host in the web browser - my usual way to get to the sites that I'm developing - and a page pops up and it reads IT WORKS!, which tells me that I have an index.php file somewhere on my computer that echos It works!. But mamp is not running and I can't find this stupid it works file anywhere. Is there any way to diagnose this and perhaps kill this apache server so that I can start mamp back up without switching my ports?

Answer: 
[MacPorts](http://www.macports.org) has several pre-configured gcc packages (from 4.2 to 4.6). Just install MacPorts and run

```
sudo port install gcc46

```
Thanks to Kenneth, you can install this pkg made for Lion:

<https://github.com/kennethreitz/osx-gcc-installer/downloads>

Note, this may be the wrong gcc for your needs as it is just an 'Xcode independent' installation of the Apple provided compilers, so the GCC is the same as that version of Xcode from whence it came. In addition, the project is now been mothballed in favour of Apple's own CLI tools package.

<http://www.kennethreitz.com/xcode-gcc-and-homebrew.html>