Another OSX upgrade, another long list of things that need to be manually fixed afterwards. This time it was even worse than the Mavericks upgrade.
Enable mod_rewrite and PHP in Apache
Uncomment the following lines in
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php5_module libexec/apache2/libphp5.so
AllowOverride All for
Restart apache with:
sudo apachectl restart
I started with a fresh config file:
sudo cp -a /etc/php.ini.default /etc/php.ini
Then added timezone information:
date.timezone = "Europe/Stockholm"
Turn off SIP
- Reboot into recovery mode by pressing
Command + Rbefore the apple logo appears.
- Open up a terminal
csrutil disable; reboot
Install PEAR & PECL Mongo driver
sudo php install-pear-nozlib.phar
Then add this to
include_path = ".:/usr/lib/php/pear"
Install XCode Command Line tools with:
Next I needed to install openssl through Homebrew. This took a few steps:
sudo chown -R $(whoami):admin /usr/local
sudo chown -R _mysql:wheel /usr/local/mysql/data
brew install openssl
brew link --force openssl
Before I could build the extension I also needed this (source):
sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib
Finally I installed the PECL Mongo driver (legacy) with:
sudo pecl install mongo
Then enable in
php.ini by adding:
And of course restart Apache again.
I needed to recreate symlinks to Haskell platform programs inside
This Stack Overflow answer explains how I did that.
Edit: After doing the above, GHC worked but whenever I tried to install anything in cabal I would get the error
/usr/bin/ar: permission denied. After a lot of messing about, I had to clear everything Haskell-related and start over:
rm -rf ~/.cabal
rm -rf ~/Library/Haskell
sudo /Library/Haskell/bin/uninstall-hs all --remove
brew uninstall ghc cabal-install
/Users/john/.cabal/bin from my path.
Then I installed GHC 7.10.2 and cabal from Homebrew and that seemed to work:
brew install ghc cabal-install
/Users/john/.cabal/bin back to my path.
Turn on SIP
Finally I turned SIP back on:
- Reboot into recovery mode again
- Run the following in a terminal:
csrutil enable; reboot