PHP 5.6.14 OS Ubuntu 14.04 LTS上的GD2扩展

I have installed Ubuntu 14.04 LTS and LAMP server. By default the installed version of php had been 5.5, so I had to upgrade to 5.6 according to the manuals on the web .
After the upgrade the GD extension is not working well.
I tried:
sudo apt-get remove -purge php5-gd - to remove and purge the installed extension.
sudo apt-get install php5-gd - to install again.
Then I test the installation and this is the output:
sudo apt-get install php5-gd

Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-gd is already the newest version.

Unfortunately I don't see the GD extension in phpinfo page and the test script from the application which I am trying to run also gives me error about GD2. Error from web app

I have tried almost every suggestion that I found in Google, but find no joy. You are my last hope now. Thank you.