Hello everyone, I got some errors while installing ANTsR package,(I have installed devtools and ITKR before), thanks in advance for spending time reading this passage.
for installing I used two methods and in both I got errors:
Warning messages:
1: In (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos, :
installation of package ‘RcppEigen’ had non-zero exit status
2: In (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos, :
installation of package ‘ANTsRCore’ had non-zero exit status
3: In (function (pkgs, lib, repos = getOption("repos"), contriburl = contrib.url(repos, :
installation of package ‘ANTsR’ had non-zero exit status
4: In neuro_install(...) :
Package(s): ANTsR released binaries/sources were not installed, please try to install with release_repo = "github"
What happens if you try to install the RcppEigen package using install.packages? The underlying issue could be a missing dependency (of a dependency of a dependency of ...).
thank you for your response,
I got some errors as below while using install.packages to install RcppEigen packages:
'''
g++ -std=gnu++17 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -o RcppEigen.so RcppEigen.o RcppExports.o fastLm.o -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
/usr/bin/ld: cannot find -llapack: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/share/make/shlib.mk:10: RcppEigen.so] Error 1
ERROR: compilation failed for package ‘RcppEigen’
removing ‘/home/masoud2204/R/x86_64-pc-linux-gnu-library/4.4/RcppEigen’
Warning in install.packages :
installation of package ‘RcppEigen’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpH28lgd/downloaded_packages’
'''
As I suspected, you are missing some system libraries. How to get them may depend on which Linux distribution you use. I'm on Mint. For Mint and Ubuntu, you can use synaptic or (at least on Mint, maybe on Ubuntu) the software manager program to install the r-recommended package. That will hopefully cover all the libraries you need to install RcppEigen.