As described in the title, I'm having issues with installing the package 'leaflet' on my shiny server (on an EC2).
** package ‘ggplot2’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (ggplot2)
* installing *source* package ‘viridis’ ...
** package ‘viridis’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (viridis)
ERROR: dependency ‘raster’ is not available for package ‘leaflet’
* removing ‘/home/shiny/R/x86_64-pc-linux-gnu-library/3.4/leaflet’
The downloaded source packages are in
‘/tmp/RtmpeFj1fk/downloaded_packages’
Warning message:
In install.packages("leaflet") :
installation of package ‘leaflet’ had non-zero exit status
> install.packages("raster")
Installing package into ‘/home/shiny/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning message:
package ‘raster’ is not available (for R version 3.4.4)
>
A dependency for leaflet, 'raster', is not available; however, I am also unable to download it as a package through R, as demonstrated.
That's what I had assumed, but I'm unsure how I would go about doing this on this Ubuntu 18.04 instance -- and I have added a public key to the system I believe.
Freezes on this chunk of code, which I believe had also happened earlier. Any idea what this could be?
I appreciate the help though!
Edit: In the monitoring portion of my AWS instance, it seems as though the CPU reaches ~100% utilization when trying to install the "leaflet" library, which leads to this crash.
EDIT: Seems as though the basic ec2.micro's memory is the issue here...
Sorry but you are not showing any error message, if the cpu is working then maybe you simply have to wait longer, a t2.micro is a very underpowered instance but it is more than capable of compiling leaflet (I have tested it), if your issue where lack of memory then the compiler should stop with a kill message, but even if that was the case you could add swap memory to solve it.