Installing system dependencies

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.)?

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.

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!

1 Like

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.

4 Likes

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...

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

1 Like

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

Eric

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.

2 Likes

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

https://rstudio.cloud/project/17896

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

2 Likes

works now, thanks a bunch!!

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!

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

1 Like

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

3 Likes

awesome, thanks for the tip!

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!

1 Like

I also want to echo my appreciation for adding all of these dependencies. I was so pleased to get a spatial RStudio Cloud workspace up and running with so little effort. One thing that looks to be missing is support for rgeos (seems to be missing libgeos). If it were possible to get that support added, it would be great.

checking geos: linking with libgeos_c... no
/usr/bin/ld: cannot find -lgeos
collect2: error: ld returned 1 exit status
configure: Install failure: compilation and/or linkage problems.
configure: error: initGEOS_r not found in libgeos_c.

libgeos is present, but the latest version of rgeos isn't compatible for reasons covered in Error deploying app with rgeos package