I tried uninstalling GD using pm-uninstall. When I ran cpan -t GD
I got the same warning but it turns out that /usr/local/include/gd.h is just a symlink to the Cellar gd.h
I tried installing GD again with cpanm and got test errors:
Failed 1/2 test programs. 7/13 subtests failed.
make: *** [test_dynamic] Error 255
Retry with --force to force install it.
I did a force install and now I'm not getting original error but I am getting this error:
Can't call method "val" on an undefined value at /Users/user/perl5/perlbrew/perls/perl-5.18.1/lib/site_perl/5.18.1/PDF/API2/Resource/XObject/Image.pm line 66.
I don't know if this is related to the failed tests.