Erros ao instalar o rgdal no RStudio 1.1 no Ubuntu 16.04

0

Estou usando:
Ubuntu 16.04.4 LTS
anaconda-navigator 1.7.0
RStudio 1.1.383

Dentro do console, eu envio

> install.packages('rgdal')

e obtenha o seguinte:

trying URL 'https://cran.rstudio.com/src/contrib/rgdal_1.2-16.tar.gz'
Content type 'application/x-gzip' length 1649449 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

* installing source package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked configure: CC: /home/name/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc
configure: CXX: /home/name/anaconda3/bin/x86_64-conda_cos6-linux-gnu-c++
configure: rgdal: 1.2-16
checking for /usr/bin/svnversion... yes
configure: svn revision: 701
checking for gdal-config... /home/name/anaconda3/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.2.2
checking GDAL version >= 1.6.3... yes
checking gdal: linking with --libs only... no
checking gdal: linking with --libs and --dep-libs... no
./configure: line 1916: /home/name/anaconda3/bin/x86_64-conda_cos6-linux-gnu-c++: No such file or directory
./configure: line 1931: /home/name/anaconda3/bin/x86_64-conda_cos6-linux-gnu-c++: No such file or directory
configure: Install failure: compilation and/or linkage problems.
configure: error: GDALAllRegister not found in libgdal.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/name/anaconda3/lib/R/library/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpIDuQu3/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

Acabei de instalar o gdal e o libgdal, então eles devem estar atualizados. Como corrijo esses erros?

    
por D. Ror. 28.02.2018 / 23:34

2 respostas

0

O mesmo problema aconteceu comigo e foi resolvido com os seguintes comandos:

sudo apt update
sudo apt install gdal-bin libgdal-dev libproj-dev

Em seguida, tente:

install.package("rgdal")
    
por user50025 12.05.2018 / 23:46
0

Eu encontrei a resposta no blog de Dean Attali sobre a criação de um servidor Rstudio no Ubuntu.

link

I used the following commands. 

sudo apt-get -y install r-base-dev

sudo apt-get -y install libcurl4-gnutls-dev libxml2-dev libssl-dev

install.packages('rgdal')
    
por gmach 17.10.2018 / 03:30