Why does installed "igraph" package return "libicui18n.so.58: cannot open shared object file"after loading? - r

I was trying to install the package igraph in R using the command install.packages("igraph"). After the installation, during testing phase it showed the following error:
testing if installed package can be loaded Error: package or namespace
load failed for ‘igraph’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object
'/home/midhun/R/x86_64-redhat-linux-gnu-library/3.5/igraph/libs/igraph.so':
libicui18n.so.58: cannot open shared object file: No such file or
directory Error: loading failed Execution halted ERROR: loading
failed
removing ‘/home/midhun/R/x86_64-redhat-linux-gnu-library/3.5/igraph’
The downloaded source packages are in
‘/tmp/RtmpLVDism/downloaded_packages’ Warning message: In
install.packages("igraph") : installation of package ‘igraph’ had
non-zero exit status
Why this is happening? What could be a solution?

The library igraph requires library files such as:
libicui18n.so.58, libicuuc.so.58, libgfortran, etc.
These were either not installed in the proper library folder or were existing as previous versions. For example, in my case, libicuuc.so.58 was required to be installed in usr/lib64. Make sure that dependencies are installed correctly to solve such problems.

Related

Error in installing R package asreml on mac

I'm not too familiar with R and are using it for Uni, and we need this asreml package for one of our classes. When I try installing it this error comes up:
Error: package or namespace load failed for ‘asreml’:
.onLoad failed in loadNamespace() for 'asreml', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-asreml/00new/asreml/libs/libvsninet.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-asreml/00new/asreml/libs/libvsninet.so, 0x0006): tried: '/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/00LOCK-asreml/00new/asreml/libs/libvsninet.so' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/asreml’
Warning in install.packages :
installation of package ‘/Users/Cami/Downloads/asreml-4.1.0.176-macOS-10.13.2-R4.2.tar.gz’ had non-zero exit status
I tried installing it on R both with a full path to the file and with a working directory set up. I've also tried to install it directly through the computer terminal, however, the same error comes up. A tutor in class has also tried to open a library for the package through the terminal on my laptop and it also didn't work. Neither of us are sure of what 'libvsninet.so' means. I've also tried to disinstall and reinstall both R and RStudio, but the result is the same.

Issue with the installation of terra package in R

I am using RRstudio 4.2.1 and I am trying to install the terra package.
Unfortunately, I get following error that I don't understand
Error: package or namespace load failed for ‘terra’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object 'my_path_here/R/x86_64-pc-linux-gnu-library/4.2/terra/libs/terra.so':
libproj.so.25: cannot open shared object file: No such file or directory
I haven't came across this error again, so I would like some help!
P.S when I am trying installing it from the terminal, I get the following in the middle of installation :./proj_conf_test: error while loading shared libraries: libproj.so.25: cannot open shared object file: No such file or directory
Thanks!

Unable to load R package gsl: libgsl.so.25: cannot open shared object file: No such file or directory

My R version is 4.1.2. It seems that I successfully install gsl package, but when I run library(gsl), I get following error:
Error: package or namespace load failed for ‘energy’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/public/home/username/localR/lib64/R/library/gsl/libs/gsl.so':
libgsl.so.25: cannot open shared object file: No such file or directory
Only this package has the error above. Meanwhile, when I try to use the packages related to it(e.x. energy), R will occur the same error. However, other packages are not affected.
Thanks.

Failing to load rgdal package in R

I'm having trouble loading rgdal in RStudio. I tried the usual command install.packages and when prompted with
"Do you want to install from sources the package which needs compilation (Yes/no/cancel)"
I've tried both yes and no. However I continue to get a cryptic error message when I try to load the library for use. It is:
Error: package or namespace load failed for ‘rgdal’ in dyn.load(file, DLLpath = >DLLpath, ...):
unable to load shared object >'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rgdal/libs/rgdal.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rgdal/libs/rgdal.so, 6): Symbol not found: _sqlite3_column_table_name
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rgdal/libs/rgdal.so (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libsqlite3.dylib
in /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rgdal/libs/rgdal.so

R packages: RCurl and curl packages install failure on Linux

I hope you can help with this issue I have come across whilst installing RCurl and curl packages for R.
Rd warning: /tmp/RtmpOBkvFC/R.INSTALLd07e6c06faf4/RCurl/man/url.exists.Rd:5: missing file link ‘file.exists’
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/majaidi/R/x86_64-redhat-linux-gnu-library/3.1/RCurl/libs/RCurl.so':
/lib64/libgssapi_krb5.so.2: symbol krb5int_buf_len, version krb5support_0_MIT not defined in file libkrb5support.so.0 with link time reference
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/majaidi/R/x86_64-redhat-linux-gnu-library/3.1/RCurl’
The downloaded source packages are in
‘/tmp/RtmpX6poG4/downloaded_packages’
Warning message:
In install.packages(pkgs = pkgs, lib = lib, repos = repos, ...) :
installation of package ‘RCurl’ had non-zero exit status`
That looks like that you have different versions of libcurl.
One approch could be the following one (for your console):
wget https://cran.r-project.org/src/contrib/curl_0.9.7.tar.gz
R CMD INSTALL curl_0.9.7.tar.gz --no-test-load
ldd /home/majaidi/R/x86_64-redhat-linux-gnu-library/3.1/curl/libs/curl.so
Then you can use ldd libcurl.so to find all dependencies and shared libraries to this.
Perhaps you can find some errors and/or you have to create a new LD_LIBRARY_PATH.
Good Luck!
J_F

Resources