title: Installation Node v4.1 with NVM - Permission denied
body: <p>I have to install Node v4.1.x on Ubuntu. I have already installed it but with the wrong version. This are the steps that I followed untill now:</p>
  
  <p>Installation of nvm</p>
  
  <pre><code>sudo git clone https://github.com/creationix/nvm.git /opt/nvm
  sudo mkdir /usr/local/nvm
  sudo addgroup -system dev
  sudo chown -R root:dev /usr/local/nvm  
  sudo chmod -R 775 /usr/local/nvm  
  sudo vim /etc/profile.d/nvm.sh
  </code></pre>
  
  <p>Editing of the file</p>
  
  <pre><code>export NVM_DIR=/usr/local/nvm
  source /opt/nvm/nvm.sh
  export NPM_CONFIG_PREFIX=/usr/local/node
  export PATH="/usr/local/node/bin:$PATH"
  </code></pre>
  
  <p>Installation of Node</p>
  
  <pre><code>sudo mkdir /usr/local/node
  sudo chown -R root:dev /usr/local/node
  sudo chmod -R 775 /usr/local/node
  nvm stable
  </code></pre>
  
  <p>For installing node v4.1.x this is what I want to do:</p>
  
  <pre><code>nvm ls           //list of all version
  nvm use 4.1.x    //if I find the correct version in the list
  </code></pre>
  
  <p>The problem is that I can't make <code>nvm ls</code> because I get</p>
  
  <pre><code>mkdir: cannot create directory ‘/usr/local/nvm/alias’: Permission denied
  </code></pre>
  
  <p>What can I do?</p>