title: AWS apt install error = Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
body: <p>Using Amazon Linux AMI (2017.03.1) on a p2.xlarge instance, and attempting to sudo apt install {somepackage}, I get the following error:</p>
  
  <pre><code>Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
  </code></pre>
  
  <p>I have already tried</p>
  
  <pre><code>sudo rm /var/lib/apt/lists/lock
  </code></pre>
  
  <p>and</p>
  
  <pre><code>sudo rm /var/cache/apt/archives/lock
  </code></pre>