title: Why n throws error? Error: sudo required (or change ownership, or define N_PREFIX)
body: <p>I want to install latest Node.js version</p>
  
  <pre><code>n latest
  
    installing : node-v14.2.0
         mkdir : /usr/local/n/versions/node/14.2.0
  mkdir: cannot create directory ‘/usr/local/n’: Permission denied
  
    Error: sudo required (or change ownership, or define N_PREFIX)
  </code></pre>
  
  <p>Something is wrong with ownership. I tried to fix this</p>
  
  <pre><code>sudo chown -R $(whoami) /usr/local/n
  </code></pre>
  
  <p>Same error again.</p>
  
  <pre><code>n latest
  cp: cannot create directory '/usr/local/lib/node_modules': Permission denied
  cp: cannot create regular file '/usr/local/bin/node': Permission denied
  cp: cannot create symbolic link '/usr/local/bin/npm': Permission denied
  cp: cannot create symbolic link '/usr/local/bin/npx': Permission denied
  </code></pre>
  
  <p>Permissions in n</p>
  
  <pre><code>/usr/local/n$ ll
  total 12
  drwxrwxr-x  3 miki root 4096 мај  8 13:29 ./
  drwxr-xr-x 11 root root 4096 мај  8 13:29 ../
  drwxrwxr-x  3 miki miki 4096 мај  8 13:29 versions/
  </code></pre>
  
  <p>SOLVED</p>
  
  <pre><code>sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/include /usr/local/share
  </code></pre>