I have followed the steps to installing io2d, however I keep getting this error:

I found an answer on StackOverflow to use these commands instead:

But I get a different error message now:

I have installed Cairo as instructed in the steps mentioned so I'm not sure what's causing the problem.
Thanks in advance for your help.