Hi,
The "ggmap" R package depends on the "jpeg" and "png" R package. Both these R packages depend on C libraries. To compile the R packages, you need to have the "development headers" for these C libraries ("libpng" and "libjpeg").
The development headers are contained in system packages. On Debian/Ubuntu system, the command to install system packages is "apt-get" but on CentOS/RedHat system, the command to install system packages is "yum"
So you need to run, as root (because it's a system package):
yum install libpng-devel libjpeg-turbo-devel
And then you can retry the install.packages("ggmap")