I am trying to install stringi package in R, but the installation never finishes. After the download and some compilation, I get the following message:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/marcus/R/x86_64-redhat-linux-gnu-library/3.3/stringi/libs/stringi.so':
/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/marcus/R/x86_64-redhat-linux-gnu-library/3.3/stringi/libs/stringi.so)
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/marcus/R/x86_64-redhat-linux-gnu-library/3.3/stringi’
The downloaded source packages are in
‘/tmp/RtmpT5KQVP/downloaded_packages’
Warning message:
In install.packages("stringi") :
installation of package ‘stringi’ had non-zero exit status
I searched the internet and I couldn't understand what this error message means. If it helps, this is my sessionInfo():
R version 3.3.1 (2016-06-21)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.3.1
I solved my problem installing gcc 4.9.2. To do so, I ran
$ sudo yum install devtoolset-3-gcc-c++
$ sudo yum install devtoolset-3-gcc-gfortran
$ scl enable devtoolset-3 bash
in the shell. The first two commands install gcc and gfortran. The last one makes gcc 4.9.2 the standard compiler in the system. After that, I opened R and ran install.packages("stringi") to have my problem solved.
Related
I'm having problem installing "Rcurl" in Rstudio on opensuse 15.2. I have installed Rstudio from the OS repository, I have been searching for similar questions and answers, and found this other question which I think it's the closest one to mine but in Ubuntu. Following some suggestions I didn't get to solve the problem in my case. Here is the error I get:
Error: package or namespace load failed for ‘RCurl’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/alcides/R/x86_64-suse-linux-gnu-library/3.5/RCurl/libs/RCurl.so':
libicui18n.so.58: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/username/R/x86_64-suse-linux-gnu-library/3.5/RCurl’
Warning in install.packages :
installation of package ‘RCurl’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpKXseTK/downloaded_packages’
This is my session info
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-suse-linux-gnu (64-bit)
Running under: openSUSE Leap 15.2
Matrix products: default
BLAS: /usr/lib64/R/lib/libRblas.so
LAPACK: /usr/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0
Thanks
I reproduced the error and at first I couldn't install RCurl. The way I solved is by installing:
sudo zypper install libcurl-devel
And then from R
install.packages ("RCurl")
Among the packages available for Leap 15.2 is also R-RCurl-1.95_4.11-lp152.6.7.x86_64.rpm, but it is for R 4.0.2, not 3.5 like the one you use.
I have installed R-3.6.1 on 64 bit slackware v14.2-current. I am trying to install an R library, rgdal. I have tried the installation from within R with
install.packages("rgdal")
and
The installation fails with the error:
...
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/user/R/x86_64-slackware-linux-gnu-library/3.6/00LOCK-rgdal/00new/rgdal/libs/rgdal.so':
libgdal.so.20: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/user/R/x86_64-slackware-linux-gnu-library/3.6/rgdal’
My GDAL installation:
bash-5.0$ gdalinfo --version
GDAL 2.4.4, released 2020/01/08
Search for libgdal:
bash-5.0$ locate libgdal.so
/usr/local/lib/libgdal.so
/usr/local/lib/libgdal.so.26
/usr/local/lib/libgdal.so.26.0.1
I tried
install.packages('rgdal', type = "source", configure.args=c('--with-libgdal=/usr/local/lib/libgdal.so.26'))
not having any idea what would happen. It failed with the same error message as above.
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-slackware-linux-gnu (64-bit)
Running under: Slackware 14.2 x86_64 (post 14.2 -current)
Matrix products: default
BLAS: /usr/lib64/R/lib/libRblas.so
LAPACK: /usr/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1 tcltk_3.6.1
R/rgdal is searching for libgdal.so.20 and I have .26, but no .20. I don't know how to, and if I should, point the install.packages() function at v.26. Will it work if the script points at .26? How do I get the script to point to the newer version of libgdal.so?
EDIT-After the comment from Roman Luštrik, I copied
cp /usr/local/lib/libgdal.so.26 /usr/lib64/
cp /usr/local/lib/libgdal.so /usr/lib64/
Then tried install.packages("rgdal") again. It failed again with a similar error message as first, except now it was missing "libproj.so.15". Thus, repeated steps:
cp /usr/local/lib/libproj.so /usr/lib64
cp /usr/local/lib/libproj.so.15 /usr/lib64
Tried install.packages("rgdal") again. This time the error was
Error: proj/epsg not found
Either install missing proj support files, for example
the proj-nad and proj-epsg RPMs on systems using RPMs,
or if installed but not autodetected, set PROJ_LIB to the
correct path, and if need be use the --with-proj-share=
configure argument.
bash-5.0# export PROJ_LIB=/usr/share/proj
bash-5.0# echo $PROJ_LIB
/usr/share/proj
Try install.packages("rgdal") again. Now the error is:
Error: package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/user/R/x86_64-slackware-linux-gnu-library/3.6/00LOCK-rgdal/00new/rgdal/libs/rgdal.so':
/home/user/R/x86_64-slackware-linux-gnu-library/3.6/00LOCK-rgdal/00new/rgdal/libs/rgdal.so:
undefined symbol: pj_get_ellps_ref
I have just initiated a EC2 server on AWS and I'm trying to install a package from
github called 'krose/skm'. The package is installed without any issues on Windows, but not on Ubuntu. All dependencies are installed. I can't figure out why it can install on Windows, but not Ubuntu.
library(devtools)
install_github('krose/skm')
And the result of running the code above is:
Downloading GitHub repo krose/skm#master
from URL https://api.github.com/repos/krose/skm/zipball/master
Installing skm
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet \
CMD INSTALL '/tmp/RtmpxJg8N7/devtools1b887e511e96/krose-skm-059766b' \
--library='/usr/local/lib/R/site-library' --install-tests
* installing *source* package ‘skm’ ...
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in namespaceExport(ns, exports) :
undefined exports: skm_umm_stations, skm_ummquery, skm_webquery
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/skm’
Error: Command failed (1)
The functions are documented using Roxygen2 and are exported. The functions are not assigned using <<-.
Here is my sessionInfo()
R version 3.2.5 (2016-04-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_1.11.1
loaded via a namespace (and not attached):
[1] httr_1.1.0 R6_2.1.2 tools_3.2.5 withr_1.0.1 curl_0.9.7
[6] memoise_1.0.0 git2r_0.14.0 digest_0.6.9
I don't have much experience with Ubuntu.
UPDATE: The R CMD check has the following two notes:
* checking DESCRIPTION meta-information ... NOTE
License components which are templates and need '+ file LICENSE':
MIT
* checking top-level files ... NOTE
Non-standard file/directory found at top level:
'README.Rmd'
The R directory in the package was misnamed as r. Windows didn't pick up on the difference, since it is more forgiving about differences in case for file and directory names.
I am unable to install packages from CRAN after upgrading R from 3.1.3 to 3.2.1.
The error message is that the shared object internet.so cannot be loaded.
install.packages("randomForest")
Installing package into ‘/gs/project/feb-684-aa/BIF/R/R-3.2.1/library’ (as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Error in url("http://cran.r-project.org/CRAN_mirrors.csv") :
internet routines cannot be loaded
In addition: Warning message:
In url("http://cran.r-project.org/CRAN_mirrors.csv") :
unable to load shared object '/software/areas/ircm/tools/R-3.2.1/lib64/R/modules//internet.so':
/software/areas/ircm/tools/R-3.2.1/lib64/R/modules//internet.so: undefined symbol: curl_multi_wait
> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: CentOS release 6.5 (Final)
locale:
[1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8
[5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8
[7] LC_PAPER=en_CA.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] nvimcom_0.9-8
loaded via a namespace (and not attached):
[1] tools_3.2.1
[blancha#lg-1r17-n04 BIF]$ ls /software/areas/ircm/tools/R-3.2.1/lib64/R/modules//internet.so -l
-rwxrwxr-x 1 blancha feb-684-01 275221 Jul 12 09:47 /software/areas/ircm/tools/R-3.2.1/lib64/R/modules//internet.so
The following post appears to address a similar issue.
Error in install.packages: internet routines cannot be loaded using StatET while it works in R console
Fixed!
Thank you #David Robinson for your suggestions. They put me on the right track.
I just added the following command to my .bash_profile, and the problem was solved:
export LD_LIBRARY_PATH=$TOOLS/curl-7.43.0/lib:$LD_LIBRARY_PATH
I'm running RStudio Server and am unable to install the zoo package. The error message I get is as follows:
Installing package(s) into ‘/home/tsajid/R/library’
(as ‘lib’ is unspecified)
trying URL 'http://mirrors.nics.utk.edu/cran/src/contrib/zoo_1.7-9.tar.gz'
Content type 'application/x-gzip' length 807084 bytes (788 Kb)
opened URL
==================================================
downloaded 788 Kb
** installing source package ‘zoo’ ...
** package ‘zoo’ successfully unpacked and MD5 sums checked
** libs
sh: make: command not found
ERROR: compilation failed for package ‘zoo’
** removing ‘/home/tsajid/R/library/zoo’
Warning in install.packages :
installation of package ‘zoo’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpsKlJWz/downloaded_packages’
I tried installing the package archive file but I get an identical error message.
Session info:
R version 2.15.1 (2012-06-22)
Platform: x86_64-redhat-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] svMisc_0.9-65
loaded via a namespace (and not attached):
[1] tools_2.15.1
It states it pretty clearly:
sh: make: command not found
So please do install the Red Hat equivalent of the Debian / Ubuntu command
sudo apt-get install r-base-dev
which via its dependence on build-essential also installs make, gcc etc pp