things broken after installing mountain lion?

Just got a chance to upgrade to mountain lion today. Looking good so far. If you haven’t done it, make sure after you install it also install the system software update from the Mac App Store.

Again they renamed my apache and php config files, thus making my website not working properly. To fix that just rename and copy old config files back (they got renamed to /etc/apache2/httpd.conf~previous and php.ini-5.2-previous).

sudo cp /etc/apache2/httpd.conf /etc/apache2/httpd.conf.mountain_lion.bak
sudo cp /etc/apache2/httpd.conf~previous /etc/apache2/httpd.conf
sudo cp /etc/php.ini-5.2-previous /etc/php.ini

Now, apache may not start. I got this error: httpd: Syntax error on line 115 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/mod_bonjour.so into server: dlopen(/usr/libexec/apache2/mod_bonjour.so, 10): image not found
. I had to comment that out to get it started. Run the following and look out for warnings.

sudo apachectl -k restart

Now even though apache is running, mysql is not… I am using a custom installed mysql at /usr/local/mysql-5.5.13-osx10.6-x86_64/bin/. So just make sure you are using the right one by issuing the following command.

type mysql

You may need to change the /etc/my.cnf file or your .bash_profile file for the $PATH variable.

Watch out for any errors from the apache error log file.

tail -f /var/log/apache2/error_log

Your website may be running fine at this point, if you don’t have any custom installed modules.

While for me, it turned out I also needed to re-install memcache. So I followed my own tutorial… 😉

Then I realized the gcc command is not found, great…

It turns out the command line compilation tools will be in a separate dmg file apart from xcode. So go download it at https://developer.apple.com/downloads/. Uncheck all the categories and leave Developer Tools checked. Then sort by date to look for Command Line Tools (OS X Mountain Lion) for Xcode – August 2012. Whatever name it is, just make sure it has Mountain Lion in it. Download and install, that will give you your gcc and g++ back.

Then phpize didn’t work… I got the following error:

Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

So go ahead and install the missing autoconf package…

sudo port install autoconf

Somewhere during the installation, it will prompt you to install java. Yea, Mountain Lion doesn’t come with java…

After you click YES to the java install, I suggest you actually go get a cup of coffee coz it will keep running and installing things for another 10 mins.

After this, just follow the remaining part of the memcache install tutorial and things will be back up and running.

Not too bad this time! 😉

2 thoughts on “things broken after installing mountain lion?

Leave a comment