Best solution is (only available for CI 3 and up):

change

 $this->load->library('encrypt');

to

 $this->load->library('encryption');

On Linux where PHP 5.6 or less…

apt-get install php5-mcrypt

About Author