Installing system dependencies


#1

Is/will it be possible to enable sudo on an RStudio cloud instance so that one could install packages from source that require additional system libraries (e.g., sf, dplyr, etc.)?


#2

Thanks for the question. Installing system level dependencies (via sudo or otherwise) is not something that we’re currently supporting. That said, we are very aware of the need and are actively looking at how we can solve the problem, while maintaining the security of the platform.

If there is a specific package you need installed, we may be able to get it installed for you.


#3

Thanks for the quick reply! I think the system dependencies for sf would be a good first step as it is under heavy development, but an option to specify a list of apt (or similar) packages would be awesome!


#4

I believe GDAL and friends are installed, but it seems like sf depends on udunits2 which has a system dependency on libudunits2.a

* installing *source* package ‘udunits2’ ...
** package ‘udunits2’ successfully unpacked and MD5 sums checked
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for XML_ParserCreate in -lexpat... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking udunits2.h usability... no
checking udunits2.h presence... no
checking for udunits2.h... no
checking for ut_read_xml in -ludunits2... no
-----Error: libudunits2.a not found-----
     If the udunits2 library is installed in a non-standard location,
     use --configure-args='--with-udunits2-lib=/usr/local/lib' for example,
     or --configure-args='--with-udunits2-include=/usr/include/udunits2'
     replacing paths with appropriate values for your installation.
     You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIB
     environment variables.
     If udunits2 is not installed, please install it.
     It is required for this package.

I think this is something that we can address. I’ll update this thread as we look into this.


#5

Thanks, in case it helps, sf’s readme has the full list of dependencies – https://github.com/r-spatial/sf#linux

I’d love to use RStudio Cloud to run a couple workshops starting in March – without sf, I’ll have to go another route…


#6

We should have additional systems dependencies in place by late next week, or early the following at the latest.


#7

I would like to install the imager package but am running into the same problem with system dependencies…same with the V8 package

Eric


#8

sf and V8 should both work at this point.
imager is failing due to hitting memory limits. I will see if we can cache a pre-built version.


#9

hmm, I just started a fresh project and install.packages('sf') gives an error

https://rstudio.cloud/project/17896


#10

It looks like a couple of hosts didn’t get the updates, they should be good now, could you try again please?


#11

works now, thanks a bunch!!


#12

V8 works for me…imager still not installing, but I can use the magick package as a workaround…thanks a lot for the assistance & speedy response, I really appreciate it!


#13

any chance of adding python modules as well? was looking to try keras and tensorflow packages in RStudio but need those modules in python to run…i think numpy is needed as well…My Rstudio session did detect a python configuration:

Detected Python configuration:
python: /usr/bin/python
libpython: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so
pythonhome: /usr:/usr
version: 2.7.12 (default, Nov 20 2017, 18:23:56) [GCC 5.4.0 20160609]
numpy: [NOT FOUND]
keras: [NOT FOUND]

python versions found:
/usr/bin/python
/usr/bin/python3


#14

If you install the keras package, and then do install_keras, it will create a Python virtualenv with the necessary Python modules.


Python in RStudio Cloud
#15

awesome, thanks for the tip!


#16

This is so great, just wanted to echo the appreciation for sf/libunits-dev, and all the other deps - I’ve been using rgdal, RNetCDF, magick, some wrappers around wget and others and everything is easy and fast so far.Thanks!