title: Resolving Chef Cookbook Dependencies
body: <p>I'm following a basic chef tutorial outlined <a href="http://gettingstartedwithchef.com/introducing-chef-server.html" rel="nofollow">here</a>, which walks you through creating an initial <code>chef-repo</code> with various cookbooks from the supermarket.</p>
  
  <p>I'm at the point where I have a hosted chef account set up and I need to upload all my local cookbooks to my hosted chef server.</p>
  
  <p>So I run this locally -</p>
  
  <pre><code>&gt; knife cookbook upload --all
  Uploading apache2      [3.0.1]
  Uploading apt          [2.7.0]
  Uploading aws          [2.7.0]
  Uploading build-essential [2.1.2]
  Uploading chef-sugar   [3.1.0]
  Uploading chef_handler [1.1.8]
  Uploading database     [4.0.6]
  Uploading homebrew     [1.12.0]
  Uploading iis          [4.1.1]
  Uploading iptables     [1.0.0]
  Uploading logrotate    [1.9.1]
  Uploading mariadb      [0.3.0]
  Uploading mysql        [4.1.2]
  ERROR: Cookbook mysql depends on cookbooks which are not currently
  ERROR: being uploaded and cannot be found on the server.
  ERROR: The missing cookbook(s) are: 'build-essential' version '~&gt; 1.4'
  </code></pre>
  
  <p>Ok, so <code>mysql</code> cookbook is complaining that it needs <code>build-essential, ~&gt; 1.4</code>. No problem, let me just get that specific version...</p>
  
  <pre><code>&gt; knife cookbook site download build-essential 1.4.4
  </code></pre>
  
  <p>Great, now I have the right <code>build-essential version</code>. Let's try it again..</p>
  
  <pre><code>&gt; knife cookbook upload --all
  Uploading apache2      [3.0.1]
  Uploading apt          [2.7.0]
  Uploading aws          [2.7.0]
  Uploading build-essential [1.4.4]
  Uploading chef-sugar   [3.1.0]
  Uploading chef_handler [1.1.8]
  Uploading database     [4.0.6]
  Uploading homebrew     [1.12.0]
  ERROR: Cookbook homebrew depends on cookbooks which are not currently
  ERROR: being uploaded and cannot be found on the server.
  ERROR: The missing cookbook(s) are: 'build-essential' version '&gt;= 2.1.2'
  </code></pre>
  
  <p>Well now it breaks <code>homebrew</code>, which complains it needs <code>build-essenitial, &gt;= 2.12</code>.</p>
  
  <p>How do I get out of this dependency cycle? I can't have two different versions of the same cookbook, can I? I downloaded this straight from the tutorial's site - am I stuck just trying to figure out the right version of all these things? </p>
  
  <p>Thanks!</p>