0 votes
Hi, I have been trying to do case 2 of the training, but when I try to install ggmap package in my virtual machine I receive a fatal error telling me that jpeglib.h is not found. I read on the internet that this file should be preinstalled or can be installed using apt-get, but every time I try to install it, it appears to me that apt-get is not found. do you have any idea how can I solve this?
asked by

1 Answer

+1 vote

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")

answered by
840 questions
866 answers
811 comments
989 users