Error loading rgdal
You can set LD_LIBRARY_PATH
to include /home/nikhail1/bin/gdal/lib
, i.e. in bash
export LD_LIBRARY_PATH="/home/nikhail1/bin/gdal/lib:$LD_LIBRARY_PATH"
ldd /home/nikhail1/R/x86_64-pc-linux-gnu-library/3.4/rgdal/libs/rgdal.so
should report libgdal.so.20
as been found. How to make this persistent depends on your desktop environment.
rgdal package installation
I f you look at the package page on CRAN, you will see the following :
SystemRequirements: for building from source: GDAL >= 1.7.1 library
from http://trac.osgeo.org/gdal/wiki/DownloadSource and PROJ.4 (proj >= 4.4.9) from http://trac.osgeo.org/proj/; GDAL OSX frameworks built by William Kyngesburye at http://www.kyngchaos.com/ may be used for
source installs on OSX.
As you seem to be under Linux, you always build package from source, so you will have to install the corresponding libraries on your system. If you are under Mint, Ubuntu or another Debian derivative, you can do :
$ sudo apt-get install libgdal1-dev libproj-dev
One tip that can be useful, still under a Debian based system, is to install the apt-file
package and run :
$ sudo apt-file update
Then, when you get an error such as :
configure: error: proj_api.h not found in standard or given locations.
You can use the following command to find which package you must install to get the missing file :
$ apt-file search proj_api.h
libproj-dev: /usr/include/proj_api.h
Trouble installing rgdal package in R 3.3.0
Wild guess: you could try to reinstall sp
before, just to have any dependency up-to-date.
Shinyapp.io cannot load rgdal package
From within Shinyapps.io , under the app's advanced settings, I unchecked the "Package Cache" and then redeployed. Then it worked. This solution was suggested by the rstudio support team.
how to install rgdal package
It should be sufficient to run install.packages('rgdal')
. R will ask you to select a mirror where the "0-Cloud [https]" mirror should work. The package rgdal is available there. The mentioned repository http://www.stats.ox.ac.uk/pub/RWin does not provide the R package.
Related Topics
Learning to Write Functions in R
Include Link to Local HTML File in Datatable in Shiny
How to Add Multiple Columns to a Tibble
Ggplot2 Log Transformation for Data and Scales
Extract First N Digits from a String
Fill Missing Values in The Data.Frame with The Data from The Same Data Frame
How to Add Geo-Spatial Connections on a Ggplot Map
How to Draw a Boxplot Without Specifying X Axis
Using Recordlinkage to Add a Column with a Number for Each Person
How to Use Stat_Function by Group
Find Second Highest Value on a Raster Stack in R
How to Set Contrasts for My Variable in Regression Analysis with R
Error Installing R Package for Linux
R: Xmleventparse with Large, Varying-Node Xml Input and Conversion to Data Frame