Reputation: 757
Running:
install.packages("RcppArmadillo")
I get the following errors:
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [RcppArmadillo.so] Error 1
ERROR: compilation failed for package ‘RcppArmadillo’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo’
The downloaded source packages are in
‘/private/var/folders/x8/mrn18h_50g78zbq2jrxcwkx00000gn/T/RtmpK4nz32/downloaded_packages’
Warning messages:
1: In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘coin’ had non-zero exit status
2: In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘Matrix’ had non-zero exit status
3: In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘RcppArmadillo’ had non-zero exit status
So it does not install it after all. I read on this link cannot compile RcppArmadillo in R but I could not do the solution because I did not understand what to do. Can you please please comment?
I even tried to do this
install.packages("https://cran.r-project.org/src/contrib/Archive/RcppArmadillo/RcppArmadillo_0.6.100.0.0.tar.gz", repos=NULL, type="source")
the same error showed up
Thanks to JPR, I found this answer which helped me solve the issue . so if you use linux, use his command line, if you use Mac, follow this post to install the runtime library
OS X package installation depends on gfortran-4.8
Upvotes: 2
Views: 1131
Reputation: 3253
You have missing runtime libraries on your machine. Simply try
sudo apt-get install libgfortan5 libgfortan-8-dev
Upvotes: 1