<p dir="auto">I understand that the package system is under heavy development, but I cannot install either Distributions nor Gadfly, because Pkg is finding dependencies that are not present in the .julia directory (nor anywhere else for that matter) and I haven't the foggiest about how to fix this because I don't know how the package system works without reading the code for it. It would be great if I didn't have to post on the mailing list asking how to resolve this issue, and there was a workaround that is documented somewhere in the Julia manual, not only for this issue but for any issue regarding packages that has come up since its inception. Somewhat of a cookbook for Pkg failures.</p>
<p dir="auto">Can pkg set a file lock of some sort so it can detect when it might have unfinished business (and possibly to protect against simultaneous access)? Would this be worthwhile?</p>
<p dir="auto">Session history:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; load(&quot;pkg&quot;)

.... #adding lots of packages

julia&gt; Pkg.add(&quot;ZMQ&quot;,&quot;Trie&quot;,&quot;Debug&quot;)
Installing Debug: v0.0.0
Cloning into 'Debug'...
remote: Counting objects: 1246, done.
remote: Compressing objects: 100% (444/444), done.
remote: Total 1246 (delta 793), reused 1230 (delta 780)
Receiving objects: 100% (1246/1246), 187.37 KiB, done.
Resolving deltas: 100% (793/793), done.
dup: Too many open files

$ # julia crashed"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">load</span>(<span class="pl-s"><span class="pl-pds">"</span>pkg<span class="pl-pds">"</span></span>)

<span class="pl-k">....</span> <span class="pl-c"><span class="pl-c">#</span>adding lots of packages</span>

julia<span class="pl-k">&gt;</span> Pkg<span class="pl-k">.</span><span class="pl-c1">add</span>(<span class="pl-s"><span class="pl-pds">"</span>ZMQ<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>Trie<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>Debug<span class="pl-pds">"</span></span>)
Installing Debug<span class="pl-k">:</span> v0.<span class="pl-c1">0.0</span>
Cloning into <span class="pl-s"><span class="pl-pds">'</span>Debug<span class="pl-pds">'</span></span><span class="pl-k">...</span>
remote<span class="pl-k">:</span> Counting objects<span class="pl-k">:</span> <span class="pl-c1">1246</span>, done.
remote<span class="pl-k">:</span> Compressing objects<span class="pl-k">:</span> <span class="pl-c1">100</span><span class="pl-k">%</span> (<span class="pl-c1">444</span><span class="pl-k">/</span><span class="pl-c1">444</span>), done.
remote<span class="pl-k">:</span> Total <span class="pl-c1">1246</span> (delta <span class="pl-c1">793</span>), reused <span class="pl-c1">1230</span> (delta <span class="pl-c1">780</span>)
Receiving objects<span class="pl-k">:</span> <span class="pl-c1">100</span><span class="pl-k">%</span> (<span class="pl-c1">1246</span><span class="pl-k">/</span><span class="pl-c1">1246</span>), <span class="pl-c1">187.37</span> KiB, done.
Resolving deltas<span class="pl-k">:</span> <span class="pl-c1">100</span><span class="pl-k">%</span> (<span class="pl-c1">793</span><span class="pl-k">/</span><span class="pl-c1">793</span>), done.
dup<span class="pl-k">:</span> Too many open files

<span class="pl-k">$</span> <span class="pl-c"><span class="pl-c">#</span> julia crashed</span></pre></div>
<p dir="auto">restart:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; load(&quot;pkg&quot;)

julia&gt; Pkg.add(&quot;ZMQ&quot;,&quot;Trie&quot;,&quot;Debug&quot;)
package already required: VersionSet(&quot;ZMQ&quot;,[])
 in anonymous at no file:98
 in cd at file.jl:176
 in cd_pkgdir at /Users/jameson/Documents/no-backup/julia/base/pkg.jl:22
 in add at /Users/jameson/Documents/no-backup/julia/base/pkg.jl:91
 in add at /Users/jameson/Documents/no-backup/julia/base/pkg.jl:116

julia&gt; Pkg.add(&quot;Trie&quot;,&quot;Debug&quot;)
package already required: VersionSet(&quot;Trie&quot;,[])
 in anonymous at no file:98
 in cd at file.jl:176
 in cd_pkgdir at /Users/jameson/Documents/no-backup/julia/base/pkg.jl:22
 in add at /Users/jameson/Documents/no-backup/julia/base/pkg.jl:91
 in add at /Users/jameson/Documents/no-backup/julia/base/pkg.jl:116

julia&gt; Pkg.add(&quot;Debug&quot;)
package already required: VersionSet(&quot;Debug&quot;,[])
 in anonymous at no file:98
 in cd at file.jl:176
 in cd_pkgdir at /Users/jameson/Documents/no-backup/julia/base/pkg.jl:22
 in add at /Users/jameson/Documents/no-backup/julia/base/pkg.jl:91
 in add at /Users/jameson/Documents/no-backup/julia/base/pkg.jl:116"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">load</span>(<span class="pl-s"><span class="pl-pds">"</span>pkg<span class="pl-pds">"</span></span>)

julia<span class="pl-k">&gt;</span> Pkg<span class="pl-k">.</span><span class="pl-c1">add</span>(<span class="pl-s"><span class="pl-pds">"</span>ZMQ<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>Trie<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>Debug<span class="pl-pds">"</span></span>)
package already required<span class="pl-k">:</span> <span class="pl-c1">VersionSet</span>(<span class="pl-s"><span class="pl-pds">"</span>ZMQ<span class="pl-pds">"</span></span>,[])
 <span class="pl-k">in</span> anonymous at no file<span class="pl-k">:</span><span class="pl-c1">98</span>
 <span class="pl-k">in</span> cd at file<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">176</span>
 <span class="pl-k">in</span> cd_pkgdir at <span class="pl-k">/</span>Users<span class="pl-k">/</span>jameson<span class="pl-k">/</span>Documents<span class="pl-k">/</span>no<span class="pl-k">-</span>backup<span class="pl-k">/</span>julia<span class="pl-k">/</span>base<span class="pl-k">/</span>pkg<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">22</span>
 <span class="pl-k">in</span> add at <span class="pl-k">/</span>Users<span class="pl-k">/</span>jameson<span class="pl-k">/</span>Documents<span class="pl-k">/</span>no<span class="pl-k">-</span>backup<span class="pl-k">/</span>julia<span class="pl-k">/</span>base<span class="pl-k">/</span>pkg<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">91</span>
 <span class="pl-k">in</span> add at <span class="pl-k">/</span>Users<span class="pl-k">/</span>jameson<span class="pl-k">/</span>Documents<span class="pl-k">/</span>no<span class="pl-k">-</span>backup<span class="pl-k">/</span>julia<span class="pl-k">/</span>base<span class="pl-k">/</span>pkg<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">116</span>

julia<span class="pl-k">&gt;</span> Pkg<span class="pl-k">.</span><span class="pl-c1">add</span>(<span class="pl-s"><span class="pl-pds">"</span>Trie<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>Debug<span class="pl-pds">"</span></span>)
package already required<span class="pl-k">:</span> <span class="pl-c1">VersionSet</span>(<span class="pl-s"><span class="pl-pds">"</span>Trie<span class="pl-pds">"</span></span>,[])
 <span class="pl-k">in</span> anonymous at no file<span class="pl-k">:</span><span class="pl-c1">98</span>
 <span class="pl-k">in</span> cd at file<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">176</span>
 <span class="pl-k">in</span> cd_pkgdir at <span class="pl-k">/</span>Users<span class="pl-k">/</span>jameson<span class="pl-k">/</span>Documents<span class="pl-k">/</span>no<span class="pl-k">-</span>backup<span class="pl-k">/</span>julia<span class="pl-k">/</span>base<span class="pl-k">/</span>pkg<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">22</span>
 <span class="pl-k">in</span> add at <span class="pl-k">/</span>Users<span class="pl-k">/</span>jameson<span class="pl-k">/</span>Documents<span class="pl-k">/</span>no<span class="pl-k">-</span>backup<span class="pl-k">/</span>julia<span class="pl-k">/</span>base<span class="pl-k">/</span>pkg<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">91</span>
 <span class="pl-k">in</span> add at <span class="pl-k">/</span>Users<span class="pl-k">/</span>jameson<span class="pl-k">/</span>Documents<span class="pl-k">/</span>no<span class="pl-k">-</span>backup<span class="pl-k">/</span>julia<span class="pl-k">/</span>base<span class="pl-k">/</span>pkg<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">116</span>

julia<span class="pl-k">&gt;</span> Pkg<span class="pl-k">.</span><span class="pl-c1">add</span>(<span class="pl-s"><span class="pl-pds">"</span>Debug<span class="pl-pds">"</span></span>)
package already required<span class="pl-k">:</span> <span class="pl-c1">VersionSet</span>(<span class="pl-s"><span class="pl-pds">"</span>Debug<span class="pl-pds">"</span></span>,[])
 <span class="pl-k">in</span> anonymous at no file<span class="pl-k">:</span><span class="pl-c1">98</span>
 <span class="pl-k">in</span> cd at file<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">176</span>
 <span class="pl-k">in</span> cd_pkgdir at <span class="pl-k">/</span>Users<span class="pl-k">/</span>jameson<span class="pl-k">/</span>Documents<span class="pl-k">/</span>no<span class="pl-k">-</span>backup<span class="pl-k">/</span>julia<span class="pl-k">/</span>base<span class="pl-k">/</span>pkg<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">22</span>
 <span class="pl-k">in</span> add at <span class="pl-k">/</span>Users<span class="pl-k">/</span>jameson<span class="pl-k">/</span>Documents<span class="pl-k">/</span>no<span class="pl-k">-</span>backup<span class="pl-k">/</span>julia<span class="pl-k">/</span>base<span class="pl-k">/</span>pkg<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">91</span>
 <span class="pl-k">in</span> add at <span class="pl-k">/</span>Users<span class="pl-k">/</span>jameson<span class="pl-k">/</span>Documents<span class="pl-k">/</span>no<span class="pl-k">-</span>backup<span class="pl-k">/</span>julia<span class="pl-k">/</span>base<span class="pl-k">/</span>pkg<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">116</span></pre></div>
<p dir="auto">but they don't seem to exist?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ls ~/.julia
ArgParse   Color      Debug      FileFind   METADATA   Optim      RDatasets  TextWrap   Winston
Cairo      DataFrames FITSIO     IniFile    Named      Options    REQUIRE    Tk"><pre class="notranslate"><code class="notranslate">$ ls ~/.julia
ArgParse   Color      Debug      FileFind   METADATA   Optim      RDatasets  TextWrap   Winston
Cairo      DataFrames FITSIO     IniFile    Named      Options    REQUIRE    Tk
</code></pre></div>
<p dir="auto">we find they aren't broken, just need to be restarted:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; Pkg.update()
Already up-to-date.
Warning: Possible conflict in library symbol floor
Warning: Possible conflict in library symbol sqrt
Installing Trie: v0.0.0
Cloning into 'Trie'...
Installing ZMQ: v0.0.0
Cloning into 'ZMQ'...
remote: Counting objects: 41, done.
remote: Compressing objects: 100% (30/30), done.
remote: Total 41 (delta 14), reused 30 (delta 6)
Receiving objects: 100% (41/41), 12.32 KiB, done.
Resolving deltas: 100% (14/14), done.

julia&gt; "><pre class="notranslate">julia<span class="pl-k">&gt;</span> Pkg<span class="pl-k">.</span><span class="pl-c1">update</span>()
Already up<span class="pl-k">-</span>to<span class="pl-k">-</span>date.
Warning<span class="pl-k">:</span> Possible conflict <span class="pl-k">in</span> library symbol floor
Warning<span class="pl-k">:</span> Possible conflict <span class="pl-k">in</span> library symbol sqrt
Installing Trie<span class="pl-k">:</span> v0.<span class="pl-c1">0.0</span>
Cloning into <span class="pl-s"><span class="pl-pds">'</span>Trie<span class="pl-pds">'</span></span><span class="pl-k">...</span>
Installing ZMQ<span class="pl-k">:</span> v0.<span class="pl-c1">0.0</span>
Cloning into <span class="pl-s"><span class="pl-pds">'</span>ZMQ<span class="pl-pds">'</span></span><span class="pl-k">...</span>
remote<span class="pl-k">:</span> Counting objects<span class="pl-k">:</span> <span class="pl-c1">41</span>, done.
remote<span class="pl-k">:</span> Compressing objects<span class="pl-k">:</span> <span class="pl-c1">100</span><span class="pl-k">%</span> (<span class="pl-c1">30</span><span class="pl-k">/</span><span class="pl-c1">30</span>), done.
remote<span class="pl-k">:</span> Total <span class="pl-c1">41</span> (delta <span class="pl-c1">14</span>), reused <span class="pl-c1">30</span> (delta <span class="pl-c1">6</span>)
Receiving objects<span class="pl-k">:</span> <span class="pl-c1">100</span><span class="pl-k">%</span> (<span class="pl-c1">41</span><span class="pl-k">/</span><span class="pl-c1">41</span>), <span class="pl-c1">12.32</span> KiB, done.
Resolving deltas<span class="pl-k">:</span> <span class="pl-c1">100</span><span class="pl-k">%</span> (<span class="pl-c1">14</span><span class="pl-k">/</span><span class="pl-c1">14</span>), done.

julia<span class="pl-k">&gt;</span> </pre></div>
<p dir="auto">now everything is correct:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ls ~/.julia
ArgParse   DataFrames FileFind   Named      RDatasets  Tk         ZMQ
Cairo      Debug      IniFile    Optim      REQUIRE    Trie
Color      FITSIO     METADATA   Options    TextWrap   Winston"><pre class="notranslate"><code class="notranslate">$ ls ~/.julia
ArgParse   DataFrames FileFind   Named      RDatasets  Tk         ZMQ
Cairo      Debug      IniFile    Optim      REQUIRE    Trie
Color      FITSIO     METADATA   Options    TextWrap   Winston
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Version 0.0.0+104039629.rdae2.dirty
Commit dae23a6824 (2012-12-09 02:32:55)*
(equivalent to commit fcaf0a0 in origin/master)"><pre class="notranslate"><code class="notranslate">Version 0.0.0+104039629.rdae2.dirty
Commit dae23a6824 (2012-12-09 02:32:55)*
(equivalent to commit fcaf0a0 in origin/master)
</code></pre></div>