Ellenz
March 14, 2020, 3:35pm
1
Hi all,
I'm trying to install the package "miceadds", but met the problems. I don't know what it means and how to solve it. Thanks for any help.
install.packages('miceadds',repos='https://cloud.r-project.org')
The error message:
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: *** [miceadds.so] Error 1
ERROR: compilation failed for package ‘miceadds’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/miceadds’
Warning in install.packages :
installation of package ‘miceadds’ had non-zero exit status
For compiling packages from source on macOS system, you need to install the recommended development tools, see the CRAN documentation for mor info.
https://cran.r-project.org/bin/macosx/tools/
Ellenz
March 14, 2020, 3:42pm
3
Thanks, I have installed using this method before, but I'm not sure why it did not work this time.
So should I install [gfortran-6.1.pkg]?
It is quite long so I extracted some of the warnings during the installation here:
There is a binary version available but the source version is later:
binary source needs_compilation
miceadds 3.1-37 3.8-9 TRUE
Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘miceadds’
trying URL 'https://cloud.r-project.org/src/contrib/miceadds_3.8-9.tar.gz'
Content type 'application/x-gzip' length 669737 bytes (654 KB)
==================================================
downloaded 654 KB
* installing *source* package ‘miceadds’ ...
** package ‘miceadds’ successfully unpacked and MD5 sums checked
** libs
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I../inst/include -DBOOST_NO_LONG_LONG -DBOOST_NO_AUTO_PTR -DRCPP_USE_UNWIND_PROTECT -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RcppArmadillo/include" -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
RcppExports.cpp:59:1: warning: unused variable 'nprot' [-Wunused-variable]
BEGIN_RCPP
^
/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/macros/macros.h:32:9: note: expanded from macro 'BEGIN_RCPP'
int nprot = 0; \
^
RcppExports.cpp:59:1: warning: unused variable 'stop_sym' [-Wunused-variable]
/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/macros/macros.h:36:17: note: expanded from macro 'BEGIN_RCPP'
static SEXP stop_sym = Rf_install("stop"); \
^
RcppExports.cpp:123:1: warning: unused variable 'nprot' [-Wunused-variable]
BEGIN_RCPP
^
/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/macros/macros.h:32:9: note: expanded from macro 'BEGIN_RCPP'
int nprot = 0; \
^
RcppExports.cpp:123:1: warning: unused variable 'stop_sym' [-Wunused-variable]
/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/macros/macros.h:36:17: note: expanded from macro 'BEGIN_RCPP'
static SEXP stop_sym = Rf_install("stop"); \
^
RcppExports.cpp:158:1: warning: unused variable 'nprot' [-Wunused-variable]
BEGIN_RCPP
^
/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/macros/macros.h:32:9: note: expanded from macro 'BEGIN_RCPP'
int nprot = 0; \
^
RcppExports.cpp:158:1: warning: unused variable 'stop_sym' [-Wunused-variable]
/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include/Rcpp/macros/macros.h:36:17: note: expanded from macro 'BEGIN_RCPP'
static SEXP stop_sym = Rf_install("stop"); \
^
RcppExports.cpp:194:1: warning: unused variable 'stop_sym' [-Wunused-variable]
BEGIN_RCPP
Yes, the error message says you don't have the gfortran compiler installed
Also, you could try to avoid compilation of packages by updating your R version, precompiled binary versions of packages are available for the latest R versions only.
Ellenz
March 15, 2020, 2:15am
5
I tried to compile without updating the current R version, and it worked. Thanks.
system
Closed
March 22, 2020, 2:27am
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.