Doug Sparling

Mobile/Web Developer

Month: November, 2013

Install the current version of Go in Ubuntu

by Doug Sparling

After running:

$ sudo apt-get install golang

I ended up with an older version of Go than I needed:

$ go version
go version go1

Wanting to use scanner from bufio, I needed Go 1.1. Fortunately, you can get the latest version from

Simply run the following:

$ sudo add-apt-repository ppa:duh/golang
$ sudo apt-get update
$ sudo apt-get install golang

Now verify that you’ve got Go updated:

$ go version
go version go1.1.1 linux/amd64

Install PHP mcrypt extension in MacOSX

by Doug Sparling

In an earlier post, Installing Multiple Versions of PHP on Mac OS X with Homebrew-PHP,  I mentioned using Homebrew-PHP to install multiple versions of PHP. I ran into an issue installing Magento due to the mcrypt extension not being loaded.

PHP extension “mcrypt” must be loaded.

Note: I’m assuming here that you have already checked your php.ini file and uncommented the appropriate line that loads the mcrypt extension.

Using Homebrew, it’s a simple process to get mcrypt added to PHP.

First, tap (which may be unnecessary if you used Homebrew-PHP):

$ brew tap josegonzalez/php

And then do the install:

$ brew install PHP53-mcrypt

This also works with PHP 5.4 (PHP54-mcrypt) and PHP 5.5 (PHP55-mcrypt).

You may be prompted to link:

Error: You must `brew link php53' before php53-mcrypt can be installed

You may also get another error, something like:

Error: Could not symlink file: /usr/local/Cellar/php53/5.3.26/bin/phpize
Target /usr/local/bin/phpize already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
brew link --overwrite formula_name

To list all files that would be deleted:
brew link --overwrite --dry-run formula_name

I didn’t have any issues with this and simply ran:

$ brew link --overwrite php53

If you get an error about not having zlib installed, they try:

$ brew tap homebrew/dupes

Restart Apache and with a little bit of luck you should have mcrypt loaded.