0

I am new to R (so your patience and support is appreciated)! I looked up this issue, but still could not find a solution that worked. I am trying to install the "party" package in R. However, I keep receiving the following error messages:

> **ld: warning: directory not found for option**
> '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2' ld: **library not
> found for -lgfortran** clang: error: linker command failed with exit
> code 1 (use -v to see invocation) make: *** [party.so] Error 1 ERROR:
> compilation failed for package ‘party’
> * removing ‘/Users/md3389/Library/R/3.3/library/party’ **Warning in install.packages :   installation of package ‘party’ had non-zero exit
> status**
> 
> The downloaded source packages are in
>   ‘/private/var/folders/fw/wxx2bzj51f7c7p6ptk_g1tyw0000gn/T/RtmpmZHUu9/downloaded_packages’

I successfully installed "mvtnorm" and "multcomp" as suggested on a similar thread here: [Error installing PARTY package in R

However, I still could not install PARTY, so I checked this thread: error install packages("party") - R studio IDE

The above thread led me to https://www.r-bloggers.com/installing-r-on-os-x/

However, I am wondering if there is a more simple solution that does not require me downloading additional software that will force me to update my version of Mac OS X to 10.13.6 or later. I currently have OS X Yosemite (version 10.10.5) and am nervous about updating, since I have heard mixed reviews.

Could someone please advise? I am trying to install "party" for a course assignment, and the "non-zero exit status" and "ld" warnings should not be what I am wasting time on! :-(

Thank you so much!

rohit thomas
  • 2,302
  • 11
  • 23
MD3389
  • 1
  • If you've done `xcode-select --install` already and it really does need gfortran, I find it's simplest to just use [the CRAN version](https://cran.r-project.org/bin/macosx/tools). – alistaire Nov 20 '18 at 05:45
  • but fwiw, I've found every recent version of macOS good besides Mojave, which is mildly annoying. High Sierra is excellent, even on old macs. – alistaire Nov 20 '18 at 05:49
  • Thanks so much @alistaire. I updated to High Sierra and restarted the computer. Then I went to the link that you recommended and installed a previous version of gfortran that was compatible with my system (gfortran-4.2.3.pkg). I then installed Xcode version 7.2.1 from the Apple Developer site here: https://developer.apple.com/download/more/ However, I still cannot install party when I go back into R. Does it only work with a certain version of Xcode and gfortran? – MD3389 Nov 20 '18 at 17:31
  • Actually, I think that what I described above WORKED!!! :-) I restarted my computer a second time after the Xcode installation. Also when I was trying to load "party" in R after the second computer restart, I selected "no" when the R console asked, "Do you want to install from sources the package which needs compilation?" I am grateful for you pointing me in the right direction, @alistaire! :-) – MD3389 Nov 20 '18 at 17:46
  • It not working when you select "yes" means your compilers are still not set up right, but most likely the error messages have changed now. Also note that you really don't need all of XCode (which is about 11Gb), just the Command Line Tools. Open XCode, select "Install Command Line Tools" from the menu, then delete the app (unless you plan on writing in Swift or something). – alistaire Nov 21 '18 at 01:08

0 Answers0