installing error
Hi, I get this error when installing the hexbin package. note: I have the gfortran installed.
install.packages("hexbin") Installing package into ‘/home/kassim/R/x86_64-pc-linux-gnu-library/3.4’ (as ‘lib’ is unspecified) trying URL 'https://cloud.r-project.org/src/contrib/hexbin_1.27.2.tar.gz' Content type 'application/x-gzip' length 491560 bytes (480 KB) ================================================== downloaded 480 KB
- installing source package ‘hexbin’ ... ** package ‘hexbin’ successfully unpacked and MD5 sums checked ** libs gfortran -fpic -g -O2 -fstack-protector-strong -c hbin.f -o hbin.o gfortran -fpic -g -O2 -fstack-protector-strong -c hcell.f -o hcell.o gfortran -fpic -g -O2 -fstack-protector-strong -c herode.f -o herode.o gfortran -fpic -g -O2 -fstack-protector-strong -c hsm.f -o hsm.o gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c reg.c -o reg.o g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o hexbin.so hbin.o hcell.o herode.o hsm.o reg.o -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR installing to /home/kassim/R/x86_64-pc-linux-gnu-library/3.4/hexbin/libs ** R ** data ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded Error: package or namespace load failed for ‘hexbin’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/home/kassim/R/x86_64-pc-linux-gnu-library/3.4/hexbin/libs/hexbin.so': libgfortran.so.5: cannot open shared object file: No such file or directory Error: loading failed Execution halted ERROR: loading failed
- removing ‘/home/kassim/R/x86_64-pc-linux-gnu-library/3.4/hexbin’
- restoring previous ‘/home/kassim/R/x86_64-pc-linux-gnu-library/3.4/hexbin’
The downloaded source packages are in ‘/tmp/RtmpaWoYsa/downloaded_packages’ Warning message: In install.packages("hexbin") : installation of package ‘hexbin’ had non-zero exit status
Is there any way to fix this please?
What is your sessionInfo()?
sessionInfo() R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.6 LTS
Matrix products: default BLAS: /usr/lib/libblas/libblas.so.3.6.0 LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=he_IL.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=he_IL.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=he_IL.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=he_IL.UTF-8 LC_IDENTIFICATION=C
attached base packages: [1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] BiocInstaller_1.24.0 qqman_0.1.4 gplots_3.0.1 lrgpr_0.1.9 aod_1.3.1
[6] bigmemory.sri_0.1.3 doParallel_1.0.14 iterators_1.0.10 BH_1.66.0-1 MASS_7.3-51.1
[11] RcppProgress_0.4.1 RcppGSL_0.3.3 Rcpp_0.12.18 RColorBrewer_1.1-2 optparse_1.6.1
[16] biganalytics_1.1.14 biglm_0.9-1 DBI_0.8 foreach_1.4.4 bigmemory_4.5.33
[21] boot_1.3-20 snow_0.4-3 mgcv_1.8-26 doBy_4.6-2 reshape_0.8.7
[26] matrixStats_0.54.0 rrBLUP_4.6 pbkrtest_0.4-7 nlme_3.1-137 lme4_1.1-18-1
[31] Matrix_1.2-14 ggplot2_3.1.0 shinyjs_1.0 shiny_1.2.0
loaded via a namespace (and not attached):
[1] jsonlite_1.5 splines_3.4.4 gtools_3.5.0 assertthat_0.2.0 yaml_2.2.0 pillar_1.2.1
[7] lattice_0.20-38 glue_1.3.0 digest_0.6.15 promises_1.0.1 minqa_1.2.4 colorspace_1.3-2
[13] htmltools_0.3.6 httpuv_1.4.5.1 plyr_1.8.4 pkgconfig_2.0.2 calibrate_1.7.2 purrr_0.2.5
[19] xtable_1.8-2 scales_0.5.0 gdata_2.18.0 getopt_1.20.2 later_0.7.5 tibble_1.4.2
[25] withr_2.1.2 lazyeval_0.2.1 cli_1.0.0 magrittr_1.5 crayon_1.3.4 mime_0.6
[31] memoise_1.1.0 rsconnect_0.8.13 tools_3.4.4 munsell_0.4.3 bindrcpp_0.2.2 compiler_3.4.4
[37] caTools_1.17.1.1 rlang_0.2.2 grid_3.4.4 nloptr_1.2.1 rstudioapi_0.9.0 bitops_1.0-6
[43] gtable_0.2.0 codetools_0.2-15 R6_2.2.2 dplyr_0.7.6 bindr_0.1.1 KernSmooth_2.23-15
[49] tidyselect_0.2.5
I would recommend upgrading R.
Thank you for answering! I tried upgrade R to version 3.6.0, but the problem remains:
R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[Previously saved workspace restored]
> install.packages('hexbin')
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/hexbin_1.27.2.tar.gz'
Content type 'application/x-gzip' length 491560 bytes (480 KB)
==================================================
downloaded 480 KB
* installing *source* package ‘hexbin’ ...
** package ‘hexbin’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -fpic -g -O2 -fstack-protector-strong -c hbin.f -o hbin.o
gfortran -fpic -g -O2 -fstack-protector-strong -c hcell.f -o hcell.o
gfortran -fpic -g -O2 -fstack-protector-strong -c herode.f -o herode.o
gfortran -fpic -g -O2 -fstack-protector-strong -c hsm.f -o hsm.o
gcc -std=gnu99 -I"/usr/share/R/include" -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c reg.c -o reg.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o hexbin.so hbin.o hcell.o herode.o hsm.o reg.o -lgfortran -lm -lquadmath -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/00LOCK-hexbin/00new/hexbin/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘hexbin’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/00LOCK-hexbin/00new/hexbin/libs/hexbin.so':
libgfortran.so.4: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/hexbin’
The downloaded source packages are in
‘/tmp/RtmpxTHc1h/downloaded_packages’
Warning message:
In install.packages("hexbin") :
installation of package ‘hexbin’ had non-zero exit status
see #7
I want to bump/+1 this issue - it's preventing me from installing the plotly R package. Anyone been able to solve this?
@adhi-r did you see #7?
@mundo03 Yes, but I am on OSX Mojave. Would it still help? I'll try.
Edit: I'm not able to install gcc-fortran, I have to install gcc. And that didn't work. :(
Edit 2: IDK what happened but it works now. I think brew install gcc worked and restarting RStudio was necessary as well. Cheers.