This is a collaborative space. In order to contribute, send an email to maximilien.chaumon@icm-institute.org
On any page, type the letter L on your keyboard to add a "Label" to the page, which will make search easier.

Installations pour R sur machines linux

TL;DR:

système debian/ubuntu/mint

sudo apt install r-base-dev libcurl4-openssl-dev libssl-dev libxml2-dev libnlopt-dev libfontconfig1-dev libcairo2-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev libudunits2-dev libharfbuzz-dev libfribidi-dev

système Fedora CentOS

yum install libcurl-devel openssl-devel libxml2-devel harfbuzz-devel freetype-devel libpng-devel udunits2-devel libicu-devel R-devel fribidi-devel

Il arrive aussi que à l’install, R ne trouve pas une librairie donnée, même si elle est déjà installée (dans DATAFAST par exemple). On peut trouver la librairie en question en tapant e.g. pour la librairie libicui18n.so.58

locate libicui18n.so.58

/DATA_FAST/software/anaconda3/lib/libicui18n.so.58
/DATA_FAST/software/anaconda3/lib/libicui18n.so.58.2
/DATA_FAST/software/anaconda3/pkgs/icu-58.2-he6710b0_3/lib/libicui18n.so.58
/DATA_FAST/software/anaconda3/pkgs/icu-58.2-he6710b0_3/lib/libicui18n.so.58.2

export LD_LIBRARY_PATH=/DATA_FAST/software/anaconda3/lib/

redémarrer R

ressayer d’installer le package.

 

Ressources utiles :

https://rviews.rstudio.com/2017/04/19/r-for-enterprise-understanding-r-s-startup/

https://github.com/vubiostat/Renv

Pour les installs de R sur postes linux

Pour pouvoir installer un package très utile dans R, il faut installer les paquets suivants:

Configuration failed because libcurl was not found. Try installing: * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc) * rpm: libcurl-devel (Fedora, CentOS, RHEL) * csw: libcurl_dev (Solaris) If libcurl is already installed, check that 'pkg-config' is in your PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config is unavailable you can set INCLUDE_DIR and LIB_DIR manually via: R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
Configuration failed because openssl was not found. Try installing: * deb: libssl-dev (Debian, Ubuntu, etc) * rpm: openssl-devel (Fedora, CentOS, RHEL) * csw: libssl_dev (Solaris) * brew: openssl@1.1 (Mac OSX) If openssl is already installed, check that 'pkg-config' is in your PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config is unavailable you can set INCLUDE_DIR and LIB_DIR manually via: R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
Configuration failed because libxml-2.0 was not found. Try installing: * deb: libxml2-dev (Debian, Ubuntu, etc) * rpm: libxml2-devel (Fedora, CentOS, RHEL) * csw: libxml2_dev (Solaris) If libxml-2.0 is already installed, check that 'pkg-config' is in your PATH and PKG_CONFIG_PATH contains a libxml-2.0.pc file. If pkg-config is unavailable you can set INCLUDE_DIR and LIB_DIR manually via: R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'

Utile aussi (pour package afex):

sudo apt install libnlopt-dev

pour flextable

sudo apt install libfontconfig1-dev libcairo2-dev