Problemas para instalar o geobr

Oi gente… bom dia… Gostaria de pedir uma ajuda porque não estou conseguindo instalar o pacote geobr. Usei o install.package(“geobr”) e deu o seguinte erro:

Configuration failed because libudunits2.so was not found. Try installing:
* deb: libudunits2-dev (Debian, Ubuntu, …)
* rpm: udunits2-devel (Fedora, EPEL, …)
* brew: udunits (OSX)
If udunits2 is already installed in a non-standard location, use:
–configure-args=’–with-udunits2-lib=/usr/local/lib’
if the library was not found, and/or:
–configure-args=’–with-udunits2-include=/usr/include/udunits2’
if the header was not found, replacing paths with appropriate values.
You can alternatively set UDUNITS2_INCLUDE and UDUNITS2_LIBS manually.

See `config.log’ for more details
ERROR: configuration failed for package ‘units’

  • removing ‘/home/ivana/R/x86_64-pc-linux-gnu-library/4.0/units’
    Warning in install.packages :
    installation of package ‘units’ had non-zero exit status
    ERROR: dependency ‘units’ is not available for package ‘sf’
  • removing ‘/home/ivana/R/x86_64-pc-linux-gnu-library/4.0/sf’
    Warning in install.packages :
    installation of package ‘sf’ had non-zero exit status
    ERROR: dependency ‘sf’ is not available for package ‘geobr’
  • removing ‘/home/ivana/R/x86_64-pc-linux-gnu-library/4.0/geobr’
    Warning in install.packages :
    installation of package ‘geobr’ had non-zero exit status
1 curtida

Pela mensagem de erro, parece que ele está procurando a biblioteca do sistema operacional chamada libdunits2.so e ela não está instalada.

Dependendo do sistema operacional que você está usando pode mudar o comando para instalar a biblioteca, por exemplo nos sistemas Ubuntu (Debian) seria algo assim no terminal:

sudo apt-get install libudunits2-dev

Em seguida você pode tentar instalar o pacote novamente do jeito normal, com install.packages.

Deu super certo!!! Obrigada!!!

1 curtida