Installation of package ‘RcppGSL’ without sudo install
Leitemfa opened this issue · 3 comments
Hi,
I have a similar problem as discussed in the past (#26) that I can not solve with sudo install
since I do not have admin priviliges.
install.packages("RcppGSL")
Installing package into ‘/home/nioo/marciol/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/RcppGSL_0.3.10.tar.gz'
Content type 'application/x-gzip' length 469346 bytes (458 KB)
==================================================
downloaded 458 KB
* installing *source* package ‘RcppGSL’ ...
** package ‘RcppGSL’ successfully unpacked and MD5 sums checked
** using staged installation
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 gsl-config... no
configure: error: gsl-config not found, is GSL installed?
ERROR: configuration failed for package ‘RcppGSL’
* removing ‘/home/nioo/marciol/R/x86_64-pc-linux-gnu-library/4.0/RcppGSL’
* restoring previous ‘/home/nioo/marciol/R/x86_64-pc-linux-gnu-library/4.0/RcppGSL’
Warning in install.packages :
installation of package ‘RcppGSL’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpgKvG95/downloaded_packages’
I can install GSL within a conda environment (/home/nioo/marciol/.conda/pkgs/gsl-2.7-he838d99_0/
), but how can I tell the install.packages
function that there is a path to find the GSL config file?
R.Version()
$platform "x86_64-pc-linux-gnu"
$arch "x86_64"
$os "linux-gnu"
$system "x86_64, linux-gnu"
$status ""
$major "4"
$minor "0.1"
$year "2020"
$month "06"
$day "06"
$`svn rev` "78648"
$language "R"
$version.string "R version 4.0.1 (2020-06-06)"
$nickname "See Things Now"
.libPaths()
"/home/nioo/marciol/R/x86_64-pc-linux-gnu-library/4.0"
"/opt/R/4.0.1/lib/R/library"
On Unix, just like on other OS, R simply calls into the $PATH
setting. So if you can only install the GSL somewhere local (say below your $HOME
) then you can "simply" install an appropriate gsl-config
in, say, ~/bin
. R will find it, use it, and just build the package.
The issue is 100% at your end, and entirely addressable at your end.
(An even simpler fix is to unpack the package you want to install and to hand-edit its src/Makevars
based on what gsl-config
would have told it. But you have to repeat that on each installation or upgrade involving RcppGSL
)
Als you simply cannot mix Conda and normal R. You can use Conda, but then you have use everything from Conda including R itself.
Closing for lack of follow-up. Feel free to reopen with new and pertinent information.