0

First of all, I am working on a Mac. I am trying to install Blotter from GitHub. I found several descriptions of how to do that but my RStudio tells me that I am missing Building tools and gives me a link (https://www.cnet.com/how-to/install-command-line-developer-tools-in-os-x/) where it is described to do that. So far so good. I downloaded Xcode and the command line tools for Mac and installed those. Nothing changed even after restarting R. Then I found this https://cran.r-project.org/bin/macosx/tools/. I installed it and during that, it told me that I had to do the following

"This package will install clang 6.0.0 for OS X 10.11 (El Capitan) or higher with OpenMP support in /usr/local/clang6

In order to use this compiler you have to add /usr/local/clang6/bin to the PATH environment variable such as export PATH=/usr/local/clang6/bin:$PATH"

So I changed the environmental variable path as follows http://blog.tonytsai.name/blog/2018-05-07-setting-path-variable-for-gs-command-in-rstudio/. How I changed the PATH variable. Again I restarted R but still, nothing changed. I still get the notice that the building tool is missing.

Somehow it seems to me that I installed everything correctly but R doesn't recognize the Programmes. Does anyone have an idea? I tried to search for settings to tell R that I installed the command line tool but couldn't really find anything helpful.

bugfreerammohan
  • 1,471
  • 1
  • 7
  • 22
tbacher
  • 1
  • 2
  • Hi tbacher, welcome to SO! Did you install command line tools before installing R? If not, have you tried reinstalling R? I recently put a fresh install of macOS (High Sierra) on my own Mac, and here's the steps I followed: **1.** install command line tools ([Here's a guide without any need to install XCode](https://www.maketecheasier.com/install-command-line-tools-without-xcode/)) **2.** install R from CRAN **3.** install RStudio. – csgroen Aug 23 '18 at 13:01
  • Thanks for the Tip. I did all that. I deleted R as well as RStudio. Then i reinstalled Xcode and the Commandline tools and after that R and RStudio. It again didn't work in RStudio. I opened R itself and tried it there. When it starts it seems to work but after a bit it stops with ... /Library/Frameworks/R.framework/Resources/bin/R: line 143: exec: sh: not found Installation failed: Command failed (127)... I am not entirely sure if the PATH Variable is set correctly. I actually found all neccesary files under the link above. – tbacher Aug 24 '18 at 12:50

2 Answers2

0

Ok, a bit of an update.

Best I can see it that Blotter is built and stored on R-Forge packages under a package called RStrategist

In R console type/cut & paste this.

install.packages('RStrategist',repos='http://R-Forge.r-project.org')

Rstrat

See R forR-Forge for more details. Once this has been installed run instead.

library(RStrategist)

Unfortunately, I am not willing to install this package and see if it works mainly because 1) don't need it nor know how to use it, 2) not sure how good packages are from R-forge, though it seems legit, but, this brings me back to point one.

tcratius
  • 525
  • 6
  • 15
  • It says it doesn't find such a package. – tbacher Aug 24 '18 at 12:56
  • I didnt see you post right away and meanwhile i was able to figure it out by myself. Thanks anyways i appreciate your help!! – tbacher Aug 27 '18 at 10:31
  • Answer your own question with the solution you came up with, @tbacher so, other people who have this issue can be helped by your experience. That is the whole point of Stackoverflow my friend :) and glad you found a solution. Though I am a little jaded I couldn't help lol, but i'll get over it. – tcratius Aug 28 '18 at 13:22
0

So before i read the updated answer of Conrad Thiele i was trying around bit. Basically i deleted R, R Studio, Xcode and Command Line tools. Then i installed Xcode, Command Line tools, R and RStudio. Then i followed the notice on https://cran.r-project.org about the tools and installed both stated tools. As mentioned in the original question the Clang package tells you to change the Environmental Variable. And there was the mistake i believe. I originally simply pasted "PATH=/usr/local/clang6/bin:$PATH" into the the ".Renviron" file. With reading up online i noticed that "export PATH=/usr/local/clang6/bin:$PATH" is actually a Command for the Mac Terminal. After executing it, it sill didn't work but then i remembered that i still had the Path "PATH=/usr/local/clang6/bin:$PATH" in the the ".Renviron" file. Once i deleted that it worked. So i guess the key was that with changing the Environmental Variable correctly R found the connection with the right tool. Patients paid off.

tbacher
  • 1
  • 2