1

I am trying to install the package C50 for R without success. I use R via Anaconda but the package is not available in the Anaconda environment so I have tried to install it directly from RStudio.

  • RStudio version is : Version 1.1.456
  • R version is : 3.6.1 (2019-07-05)
  • Anaconda version is :1.9.7
  • MacOS : Catalina 10.15.3

I have both used the standard install.packages("C50") as well as the direct installation (using devtools) from the GitHub repository. Searching around it seems that this is an issue related to the SDK headers (? I don't know what that is) and the evolution of the directories in MacOs system over time.

One online search led me here (but again I don't know how to move forward):

https://github.com/conda-forge/compilers-feedstock/issues/11

I reproduce below the message I get when trying to install the package :

* installing *source* package ‘Cubist’ ...
** package ‘Cubist’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in `/private/var/folders/sh/hq44lqs10677_vvkvxq01yvh0000gn/T/Rtmpk04dKp/R.INSTALL5020659d63fc/Cubist':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: configuration failed for package ‘Cubist’
* removing ‘/opt/anaconda3/lib/R/library/Cubist’
* restoring previous ‘/opt/anaconda3/lib/R/library/Cubist’
Warning in install.packages :
  installation of package ‘Cubist’ had non-zero exit status
* installing *source* package ‘C50’ ...
** package ‘C50’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... x86_64-apple-darwin13.4.0-clang
checking whether the C compiler works... no
configure: error: in `/private/var/folders/sh/hq44lqs10677_vvkvxq01yvh0000gn/T/Rtmp2NjIsn/R.INSTALL50b47eac3131/C50':
configure: error: C compiler cannot create executables
See `config.log' for more details.
ERROR: configuration failed for package ‘C50’
* removing ‘/opt/anaconda3/lib/R/library/C50’
Warning in install.packages :
  installation of package ‘C50’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/sh/hq44lqs10677_vvkvxq01yvh0000gn/T/RtmpdUmDxS/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

Another hint is to look in the config.log but I don't know how to find it.

I don't know how to interpret this message and any hint would be great.

Karolis Koncevičius
  • 9,417
  • 9
  • 56
  • 89
atalantafugiens
  • 423
  • 6
  • 16

1 Answers1

0

One possibility is that your xcode license expired. Try running:

sudo xcodebuild -license

in the command line and then agreeing with the license.

Karolis Koncevičius
  • 9,417
  • 9
  • 56
  • 89
  • @trojanfoe I am suggesting to try this because it has solved very similar issues for me in the past. Here is the answer I got this from: https://stackoverflow.com/a/19993810/1953718 – Karolis Koncevičius Apr 03 '20 at 16:55
  • Thank you @KarolisKoncevičius. When I run that command in the terminal I get : xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance – atalantafugiens Apr 04 '20 at 07:36
  • @atalantafugiens Can you try `xcode-select --install` first? – Karolis Koncevičius Apr 04 '20 at 07:59
  • @KarolisKoncevičius, yes that is what I did next but got : xcode-select: error: command line tools are already installed, use "Software Update" to install updates – atalantafugiens Apr 04 '20 at 18:27