title: Unable to install packages through home-brew
body: <p>I am tring to install new packages like keras, gnuplot or tensor flow. But my home-brew keeps giving me an error and I am unable to figure out what is wrong exactly.</p>
  
  <p>I have already tried upgrading home-brew and a lot of other functions. But they just don't seem to work. I am pretty new to UNIX, and hence, I am not familiar with most of these errors.</p>
  
  <p>Do let me know what I can do to get this problem solved.</p>
  
  <p>If I type : <code>brew install gnuplot</code>
  I get this:</p>
  
  <pre><code>portable-ruby/2.3.3_2/share/man/man1/ri.1: Failed to create dir 'portable-ruby/2.3.3_2'Can't create 'portable-ruby/2.3.3_2/share/man/man1/ri.1'
  portable-ruby/2.3.3_2/share/man/man1/ruby.1: Failed to create dir 'portable-ruby/2.3.3_2'Can't create 'portable-ruby/2.3.3_2/share/man/man1/ruby.1'
  tar: Error exit delayed from previous errors.
  Error: Failed to upgrade vendor ruby.
  Error: Failed to upgrade vendor Ruby.
  Updating Homebrew...
  fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied
  fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied
  Cannot save the current index state
  Error: Could not 'git stash' in /usr/local/Homebrew!
  Please stash/commit manually if you need to keep your changes or, if not, run:
    cd /usr/local/Homebrew
    git reset --hard origin/master
  /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- dbm (LoadError)
  </code></pre>