rOpenSpain / mapSpain

R package with the administrative boundaries of Spain, including CCAA, provinces and municipalities
https://ropenspain.github.io/mapSpain/
GNU General Public License v3.0
42 stars 3 forks source link

Problem installing mapSpain in R version 4.2.1 (2022-06-23) #77

Closed ajcanepa closed 2 years ago

ajcanepa commented 2 years ago

Hi there, I recently created fabolous plots using mapSpain (great work with the package!).

However after upgrade to Ubuntu 22 and R to 4.2.1 versions, I have the following error message when trying to install/update mapSpain:

` caught segfault address 0x5564c5fc3920, cause 'memory not mapped' An irrecoverable exception occurred. R is aborting now ... Segmentation fault (core dumped) ERROR: lazy loading failed for package ‘mapSpain’

Any idea will be welcomed!

dieghernan commented 2 years ago

It seems to me that the problem could be on the installation of raster based on the messages.

Could you please try install.packages("raster") first?

ajcanepa commented 2 years ago

Hi @dieghernan , Yes, you were right. The thing is raster package requires the terra package and I had dependency problems. So after executing: sudo apt update and then sudo apt -y install r-cran-terra, I finally was able to install raster in R install.packages('raster').

After this, the suggested installation in the main page of mapSpain here solved the problem.

Many thanks!