Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
333 views
in Technique[技术] by (71.8m points)

r - Rmarkdown won't knit to HTML xcrun: error on mac

I recently switched from a pc to a macbook (running big sur 11.0.1) and just installed R studios yesterday. I'm working in R and I get this error when I try to knit to an HTML:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Quitting from lines 15-18 (thesis_analyses.Rmd) 
Error in View(sp) : X11 dataentry cannot be loaded
Calls: <Anonymous> ... withCallingHandlers -> withVisible -> eval -> eval -> View
Execution halted

Has anyone had this issue before?

The closest solution I could find was here, but I wanted to see if anyone had encountered the same issue or could confirm this would fix my problem before proceeding. I get real nervous messing around in my terminal without guidance...

Thank you in advance!

question from:https://stackoverflow.com/questions/65649781/rmarkdown-wont-knit-to-html-xcrun-error-on-mac

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

So I did need to install the command line tools, but I also needed to install XQuartz before I could use the knit function. Now it works!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...