1

I recently setup a jupyterhub on Ubuntu 16.04. I successfully added R and added most packages I need, but for some reason there are a lot of issues adding the rgdal package. I have followed many other guides online such as the following lines:

sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable sudo apt update sudo apt install gdal-bin python-gdal python3-gdal libgdal1-dev

As well as:

sudo add-apt-repository 'deb https://cran.rediris.es/bin/linux/ubuntu xenial/' sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 sudo apt update

When I try to run conda install -c conda-forge r-rgdal I get the following output and I am not sure what exactly I should do to fix it

UnsatisfiableError: The following specifications were found to be in conflict: - r-microsoftr - r-rgdal -> r-base=3.4.1 -> _r-mutex=1[build=anacondar_1] - r-rgdal -> r-base=3.4.1 -> pango=1.40 -> harfbuzz=1.3 - r-rgdal -> r-base=3.4.1 -> tk=8.5

Here is the output when I try to run install.packages("rgdal") in the jupyterhub:

** package ‘rgdal’ successfully unpacked and MD5 sums checked configure: CC: x86_64-conda_cos6-linux-gnu-cc configure: CXX: x86_64-conda_cos6-linux-gnu-c++ configure: rgdal: 1.3-2 checking for /usr/bin/svnversion... no configure: svn revision: 755 checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether x86_64-conda_cos6-linux-gnu-c++ accepts -g... yes checking whether x86_64-conda_cos6-linux-gnu-c++ supports C++11 features by default... yes configure: C++11 support available checking for gdal-config... /home/ubuntu/anaconda3/envs/jupyterhub-tutorial/bin/gdal-config checking gdal-config usability... yes configure: GDAL: 2.1.4 checking GDAL version >= 1.11.4... yes checking gdal: linking with --libs only... no checking gdal: linking with --libs and --dep-libs... yes checking GDAL: /home/ubuntu/anaconda3/envs/jupyterhub-tutorial/share/gdal/pcs.csv readable... yes configure: pkg-config proj exists, will use it configure: PROJ version: 4.9.2 checking proj_api.h presence and usability... no configure: error: proj_api.h not found in standard or given locations. ERROR: configuration failed for package ‘rgdal’ * removing ‘/home/ubuntu/anaconda3/envs/jupyterhub-tutorial/lib/R/library/rgdal’ ERROR: dependency ‘rgdal’ is not available for package ‘gdalUtils’ * removing ‘/home/ubuntu/anaconda3/envs/jupyterhub-tutorial/lib/R/library/gdalUtils’

EDIT: I have followed this link and when I enter apt-file search proj_api.h I get the same output libproj-dev: /usr/include/proj_api.h but I am not sure what I am supposed to do with this to make it work. Any advice would be greatly appreciated - it seems like everything I try will not work. Thanks!

  • I just updated my question. I have already been looking at this linked post but it was still not able to fix any problems. I am confused on what the solution to that problem is saying, but I followed it and I am still in the same spot. – Daniel Rychel Jun 25 '18 at 18:40

0 Answers0