Failed to load cairo DLL

ide-issue

#1

I just installed Rstudio but unable to plot anything.

e.g.

x=c(1,2,3,1,3,4,1,3,4,1,1,2,3)
hist(x)

and I got this error:

Error in RStudioGD() :
Shadow graphics device error: r error 4 (R code execution error)
In addition: There were 50 or more warnings (use warnings() to see the first 50)

warnings()

Warning messages:
1: In grDevices:::png("/tmp/RtmpPkPH0s/2014fedfd6c041009a185a492193d67e.png", ... :
failed to load cairo DLL

!!

P.S. the same code works fine in R terminal.

Any ideas or helps would be appreciated.


#2

Hi blackhole2, could you offer

  • RStudio Edition: (Desktop or Server)
  • RStudio Version:
  • OS Version:
  • R Version:
  • the output of sessionInfo()
  • and what do you see when you enter options("device")

And I have a good feeling that you'll get this sorted with a uninstall and reinstall of RStudio IDE and R.


#3

I just changed the system PATH for another version of R and it is now solved!

Thanks a lot :slight_smile: