I am having an issue publishing my HTML Knit file using R Markdown. After a successful Knit, I get the following message when I click on the Publish Document button:
Install Required Packages,
Publishing content requires an updated version of the RJSONIO package
Do you want to install the package now?
Yes No
If I click on Yes I get an Installing Packages console that runs through a lot of code and disappears. If I click on the Publish button again, I get the same message as above.
If I click on No, go back to my R markdown document, and try to install the RJSONIO package using the install.packages("RJSONIO"), I get the following message:
Warning in install.packages : installation of package ‘RJSONIO’ had non-zero exit status
I have searched far and wide for an answer to both of these issues and I cannot find anything so any help would be greatly appreciated.
Could you post the whole message? I think you are omitting the useful parts.
Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘RJSONIO
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2019b.1.0/zoneinfo/America/Denver'
installing source package ‘RJSONIO’ ...
** package ‘RJSONIO’ successfully unpacked and MD5 sums checked
Trying to find libjson.h header file
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in /private/var/folders/5s/hsw002g127z5nxv5fcjyfvl00000gn/T/RtmpxZeA0P/R.INSTALLdc0f75e2a15/RJSONIO': configure: error: C compiler cannot create executables Seeconfig.log' for more details
ERROR: configuration failed for package ‘RJSONIO’
removing ‘/Users/garrettsmith/Library/R/3.4/library/RJSONIO’
Warning in install.packages :
installation of package ‘RJSONIO’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/5s/hsw002g127z5nxv5fcjyfvl00000gn/T/RtmpikLf2g/downloaded_packages’
Do you have xcode installed in your system? You need it for compiling packages on MacOS
xcode-select --install
Here are some installation instructions
Mac users who prefer to have a more traditional Unix toolkit accessible to them through the Terminal may wish to install the optional Command Line Tools subsection of the Xcode IDE. From MacOS Monterey, Big Sur, Catalina, Mojave, High Sierra, Sierra,...
Est. reading time: 4 minutes