Need help to install FileMagic on Ubuntu Fiesty

I’m trying to install FileMagic on Ubuntu. I’ve done this a number of
times on OS X (swapping out apt-get for macports) like so:

$ apt-get install file
$ curl -O
$ tar -xzf ruby-filemagic-0.1.1.tar.gz
$ cd ruby-filemagic-0.1.1.tar.gz
$ ruby extconf.rb

Then make & make install. I can’t seem to manage on Ubuntu though. The
error I’m getting during extconf is:

checking for magic_open() in -lmagic… no
*** ERROR: missing required library to compile this module
*** extconf.rb failed ***

Can anyone help?