Getting "mkdir: cannot create directory ..." when installing and using NVM / Node.js commands

I beg you, but not Linux wiz (unfortunately). In any case, I have a freshly installed version of Ubuntu Linux 14.04 LTS on which I recently installed NVM and Node.js. I did this by entering the following two commands into my terminal, following these instructions .

curl https://raw.githubusercontent.com/creationix/nvm/v0.7.0/install.sh | sh nvm install 0.10

Amazingly, I have NVM and Node installed! Running type commands nvm lsprovides me with a list of installed versions, etc. So? ok, the problem is that after restarting my computer / logout. I get:

ricardo:~$ nvm ls
    sbin
mkdir: cannot create directory ‘/usr/sbin/alias’: Permission denied

I get similar messages with other commands, for example:

ricardo:~$ nvm use 0.10
 N/A version is not installed yet
ricardo:~$ nvm deactivate
 Could not find /usr/sbin/*/bin in $PATH
 Could not find /usr/sbin/*/share/man in $MANPATH
 Could not find /usr/sbin/*/lib/node_modules in $NODE_PATH

~/.nvm/, , Node, , , ?: `(

+4
1

Ubuntu 14.04, ​​, $NVM_DIR nvm.sh, :

export NVM_DIR=~/.nvm
. .nvm/nvm.sh

nvm, , .

+13

Source: https://habr.com/ru/post/1541180/


All Articles