title: sudo: update-alternatives: command not found
body: <p>I am trying to install Java version 8 on my MacOS. The installation guideline advises typing this command:</p>
  
  <blockquote>
    <p><code>sudo update-alternatives --install /usr/bin/java java /usr/lib/java/JDk.../bin/java</code></p>
  </blockquote>
  
  <p>But it returns the following error:</p>
  
  <p>sudo: update-alternatives: command not found</p>
  
  <p>I tried to add the command by typing </p>
  
  <pre><code>brew install update-alternatives
  </code></pre>
  
  <p>But it gave me another error:</p>
  
  <pre><code>warning: unable to access '/Users/user_name/.config/git/attributes': Permission denied
  </code></pre>
  
  <p>Any idea of how I can fix this issue?</p>