# Cannot save Gadfy plot, requires Cairo+Fontconfig although its installed

**URL:** <https://discourse.julialang.org/t/cannot-save-gadfy-plot-requires-cairo-fontconfig-although-its-installed/5322>\
**Category:** General Usage\
**Tags:** plotting, gadfly\
**Created:** [August 10, 2017, 8:07pm UTC](https://discourse.julialang.org/t/cannot-save-gadfy-plot-requires-cairo-fontconfig-although-its-installed/5322 "2017-08-10T20:07:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vgdev](https://avatars.discourse-cdn.com/v4/letter/v/47e85d/32.png) [@vgdev](https://discourse.julialang.org/u/vgdev)\
**Post date:** [August 10, 2017, 8:07pm UTC](https://discourse.julialang.org/t/cannot-save-gadfy-plot-requires-cairo-fontconfig-although-its-installed/5322/1 "2017-08-10T20:07:59Z")

</div>

I am struggling with saving a simple Gadfly plot in PNG format.

```julia
using Cairo
using Fontconfig
using Gadfly
myplot =plot(x=rand(10), y=rand(10), Geom.point, Geom.line)

draw(PNG("myplot.png", 4inch, 3inch), myplot)

```

The code above gives the following error:

> Cairo and Fontconfig are necessary for the PNG backend. Run:  
> Pkg.add(“Cairo”)  
> Pkg.add(“Fontconfig”)  
> You also have to delete C:\\\\\\\\\\\\\\\\\\\\\\\\\\\Users\Bruker\AppData\Local\JuliaPro-0.6.0.1\pkgs-0.6.0.1\v0.6v0.6\Compose.ji  
> and restart your REPL session afterwards.  
> in PNG at Compose\src\Compose.jl:170

When running

```julia
  Pkg.add("Cairo")
  Pkg.add("Fontconfig")

```

i get notified that the packages are already installed. I would very much appreciate any help with this 🙂

---

<div class="post-metadata">

**Author:** ![lobingera](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lobingera/32/211_2.png) [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Post date:** [August 11, 2017, 7:53am UTC](https://discourse.julialang.org/t/cannot-save-gadfy-plot-requires-cairo-fontconfig-although-its-installed/5322/2 "2017-08-11T07:53:25Z")

</div>

> [@vgdev](#):
>
> You also have to delete C:\\\\\\\\\\\\\\Users\Bruker\AppData\Local\JuliaPro-0.6.0.1\pkgs-0.6.0.1\v0.6v0.6\Compose.ji  
> and restart your REPL session afterwards.

Have you done this also and rebuild Compose?

---

<div class="post-metadata">

**Author:** ![vgdev](https://avatars.discourse-cdn.com/v4/letter/v/47e85d/32.png) [@vgdev](https://discourse.julialang.org/u/vgdev)\
**Post date:** [August 11, 2017, 8:48am UTC](https://discourse.julialang.org/t/cannot-save-gadfy-plot-requires-cairo-fontconfig-although-its-installed/5322/3 "2017-08-11T08:48:58Z")

</div>

I eventually found the file, deleted it and ran `Pkg.build("Compose")` and restarted Julia. Now it runs like a dream. Thx
