I just followed the tutorial located at https://www.digitalocean.com/community/articles/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu while fixing multiple other er
I've followed the exact tutorial with OP on digital ocean. The only steps that missing is to
sudo php5enmod mcrypt sudo service apache2 restart
and the error gone after restarting the apache service