Failed to load cairo DLL

I just installed Rstudio but unable to plot anything.



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)


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.

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.

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

Thanks a lot :slight_smile:

1 Like