I followed the instructions on
Piwik failed after upgrade, however the fix was very easy:
apt-get install php-mbstring
apt-get -y install php-gd
(I thought this might be useful to people, because when searching for a solution I found lots of info about having to recompile php)