Fixing gd Problem in PHP on Ubuntu 11.04

I was trying to enable gd for php in Ubuntu 11.04. As usual it should be typing in terminal: $ sudo apt-get install php5-gd Unfortunately it does not worked and gd was not enabled Typing the command php -a I was getting: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20090626+lfs/gd.so’ - /usr/lib/php5/20090626+lfs/gd.so: undefined symbol: gdImageCreateFromJpeg in Unknown on line 0 By googling I got this bug report and a solution along.