I'm a bit at a loss what you are referring to with GD module 2 and GD module 3 but I guess that "missing some prerequisites" might be the clue. It would have been helpful if you'd included some of the actual commands and the corresponding error messages of your attempts at installing GD, because the module GD::Image is bundled with the GD distribution.
GD is an interface to the GD graphics library which is written in C. If you want to install Perl's GD package from source (and not from your macbook's package system), you need the GD runtime libraries and the C headers. On Debian the packages are called libgd3 and libgd-dev, but I have no idea how Mac calls them.