Won't let me install spam package

Hi all,

I need to download the LMERConvenienceFunctions package but get error saying spam isn't downloaded. But spam won't download either. I have copied error message below:

> library(LMERConvenienceFunctions)
Error: package or namespace load failed for ‘LMERConvenienceFunctions’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 there is no package called ‘spam’

> install.packages("spam")

  There is a binary version available but the source version is later:
     binary source needs_compilation
spam  2.5-1  2.6-0              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
installing the source package ‘spam’

trying URL 'https://cran.rstudio.com/src/contrib/spam_2.6-0.tar.gz'
Content type 'application/x-gzip' length 1789093 bytes (1.7 MB)
downloaded 1.7 MB

* installing *source* package ‘spam’ ...
** package ‘spam’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c bckslvmodified.f -o bckslvmodified.o
make: gfortran: No such file or directory
make: *** [bckslvmodified.o] Error 1
ERROR: compilation failed for package ‘spam’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/spam’
Warning in install.packages :
  installation of package ‘spam’ had non-zero exit status

The downloaded source packages are in

The easiest solution would be to answer "no" to this question, you would get a precompiled binary version that is a little older but much easier to install.
If you need to install the latest version from source, then you need to install Xcode in your system (not in R) and the recommended development tools for macOS systems.

1 Like

Thank you so much this has worked!!!

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.