Failed to Install fBasics package

I tried to install fBasics package. I believe that is is already installed, but when I type into library() or require() command, it always tells that there is no such package. I attached my error messages below.


install.packages("fBasics")
also installing the dependency ‘gss’

There are binary versions available but the source versions are later:
binary source needs_compilation
gss 2.1-9 2.1-12 TRUE
fBasics 3042.89 3042.89.1 TRUE

Do you want to install from sources the packages which need compilation?
y/n: y
installing the source packages ‘gss’, ‘fBasics’

trying URL 'https://cran.rstudio.com/src/contrib/gss_2.1-12.tar.gz'
Content type 'application/x-gzip' length 513616 bytes (501 KB)

downloaded 501 KB

trying URL 'https://cran.rstudio.com/src/contrib/fBasics_3042.89.1.tar.gz'
Content type 'application/x-gzip' length 851865 bytes (831 KB)

downloaded 831 KB

  • installing source package ‘gss’ ...
    ** package ‘gss’ successfully unpacked and MD5 sums checked
    ** libs
    gfortran -fPIC -g -O2 -c cdennewton.f -o cdennewton.o
    make: gfortran: No such file or directory
    make: *** [cdennewton.o] Error 1
    ERROR: compilation failed for package ‘gss’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/gss’
    Warning in install.packages :
    installation of package ‘gss’ had non-zero exit status
    ERROR: dependency ‘gss’ is not available for package ‘fBasics’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/fBasics’
    Warning in install.packages :
    installation of package ‘fBasics’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/zw/qjv_vp8j0lj8031gkwx34ljc0000gn/T/RtmpEB1cec/downloaded_packages’

library(fBasics)
Error in library(fBasics) : there is no package called ‘fBasics’
library("fBasics")
Error in library("fBasics") : there is no package called ‘fBasics’


Thank you for any kinds of suggestion and help!

The easiest solution, update your R version so you have access to precompiled binaries and answer "no" to this question.

If you still want to install from source, you need to install xcode in your system and the recommended development tools for MacOS systems
https://cran.r-project.org/bin/macosx/tools/

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

Thank you, solved! I also need to install datetime packages first to resolve this issue.