error when installing `hts` package from CRAN and github
rosseji opened this issue · 3 comments
rosseji commented
install.packages('hts', dependencies = TRUE)
#>
#> There is a binary version available but the source version is
#> later:
#> binary source needs_compilation
#> hts 5.1.0 5.1.4 TRUE
#> installing the source package 'hts'
#> Warning in install.packages("hts", dependencies = TRUE): installation of
#> package 'hts' had non-zero exit status
Particular warnings (not in reprex output):
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
session info
sessionInfo()
#> R version 3.4.0 (2017-04-21)
#> Platform: x86_64-apple-darwin15.6.0 (64-bit)
#> Running under: macOS Sierra 10.12.5
#>
#> Matrix products: default
#> BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
#>
#> locale:
#> [1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> loaded via a namespace (and not attached):
#> [1] compiler_3.4.0 backports_1.1.0 magrittr_1.5 rprojroot_1.2
#> [5] tools_3.4.0 htmltools_0.3.6 yaml_2.1.14 Rcpp_0.12.11
#> [9] stringi_1.1.5 rmarkdown_1.6 knitr_1.16 stringr_1.2.0
#> [13] digest_0.6.12 evaluate_0.10.1
rosseji commented
Same with github:
devtools::install_github("earowang/hts")
#> Downloading GitHub repo earowang/hts@master
#> from URL https://api.github.com/repos/earowang/hts/zipball/master
#> Installing hts
#> '/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file \
#> --no-environ --no-save --no-restore --quiet CMD INSTALL \
#> '/private/var/folders/50/z3bwdc8508gdy8b90x43lv7h0000gn/T/RtmpjIvpf4/devtools166f678c9991/earowang-hts-10a19b6' \
#> --library='/Library/Frameworks/R.framework/Versions/3.4/Resources/library' \
#> --install-tests
#>
#> Installation failed: Command failed (1)
earowang commented
Although I cannot reproduce the installation problem on my local macOS and Ubuntu server, it may arise from gfortran not installed on your mac, which is required for installing Rcpp and RcppArmadillo. Please install gfortran installer first and restart R. The recent gfortran version can be obtained from https://gcc.gnu.org/wiki/GFortranBinaries.
rosseji commented
Cool, works fine. Thanks