nvm install iojs: mkdir: cannot create directory ‘/Users’: Permission denied

Created on 4 Sep 2015  Â·  5Comments  Â·  Source: nvm-sh/nvm

OS:

uname -a
Linux *** 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
echo PATH: $PATH NODE_PATH: $NODE_PATH
PATH: bin:.bin:/home/invntrm//dotfiles/bin:/home/invntrm//bin:/usr/local/share/npm/bin:/home/invntrm//node_modules/.bin:./node_modules/.bin:bin:.bin:/home/invntrm//dotfiles/bin:/home/invntrm//bin:/usr/local/share/npm/bin:/home/invntrm//node_modules/.bin:./node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/invntrm//.bem-levels:/home/invntrm//.bem-levels
NODE_PATH: ./node_modules:/usr/local/lib/node_modules:./node_modules:/usr/local/lib/node_modules:
installing node profile detection needs followup

Most helpful comment

thank you for NODE_PATH comment and yes, it isn't my issue

but, i found today this:

export NVM_DIR="/Users/invntrm/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

and fixed by:

export NVM_DIR="$HOME/.nvm"
[ -s $NVM_DIR/nvm.sh ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

Thank you, again, and i'm sorry!

All 5 comments

Why is NODE_PATH set?? global modules should never be require-able.

However, I don't think that's your issue. Can you provide the full shell output of nvm install iojs, as well as nvm debug?

thank you for NODE_PATH comment and yes, it isn't my issue

but, i found today this:

export NVM_DIR="/Users/invntrm/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

and fixed by:

export NVM_DIR="$HOME/.nvm"
[ -s $NVM_DIR/nvm.sh ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

Thank you, again, and i'm sorry!

Attempting to install a newer nodejs

$ nvm install v6.10.3
mkdir: cannot create directory ‘/home/ic/.nvm/alias/lts’: Permission denied
mkdir: cannot create directory ‘/home/ic/.nvm/alias/lts’: Permission denied
Downloading and installing node v6.10.3...
mkdir: cannot create directory ‘/home/ic/.nvm/.cache’: Permission denied
creating directory /home/ic/.nvm/.cache/bin/node-v6.10.3-linux-x64/files failed
Downloading https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-x64.tar.xz...
Warning: Failed to create the file 
Warning: /home/ic/.nvm/.cache/bin/node-v6.10.3-linux-x64/node-v6.10.3-linux-x64
Warning: .tar.xz: No such file or directory
                                                                           0.0%
curl: (23) Failed writing body (0 != 848)
Binary download from https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-x64.tar.xz failed, trying source.
grep: /home/ic/.nvm/.cache/bin/node-v6.10.3-linux-x64/node-v6.10.3-linux-x64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
mkdir: cannot create directory ‘/home/ic/.nvm/.cache’: Permission denied
creating directory /home/ic/.nvm/.cache/src/node-v6.10.3/files failed
Downloading https://nodejs.org/dist/v6.10.3/node-v6.10.3.tar.xz...
Warning: Failed to create the file 
Warning: /home/ic/.nvm/.cache/src/node-v6.10.3/node-v6.10.3.tar.xz: No such 
Warning: file or directory
                                                                           0.0%
curl: (23) Failed writing body (0 != 847)
Binary download from https://nodejs.org/dist/v6.10.3/node-v6.10.3.tar.xz failed, trying source.
grep: /home/ic/.nvm/.cache/src/node-v6.10.3/node-v6.10.3.tar.xz: No such file or directory
Provided file to checksum does not exist.

_-_-_-_-_-_-_-_-_-_-_-_-_
$ nvm install iojs
mkdir: cannot create directory ‘/home/ic/.nvm/alias/lts’: Permission denied
Downloading and installing  v3.3.1...
mkdir: cannot create directory ‘/home/ic/.nvm/.cache’: Permission denied
creating directory /home/ic/.nvm/.cache/bin/iojs-v3.3.1-linux-x64/files failed
Downloading https://iojs.org/dist/v3.3.1/iojs-v3.3.1-linux-x64.tar.xz...
Warning: Failed to create the file 
Warning: /home/ic/.nvm/.cache/bin/iojs-v3.3.1-linux-x64/iojs-v3.3.1-linux-x64.t
Warning: ar.xz: No such file or directory
                                                                           0.2%
curl: (23) Failed writing body (0 != 16038)
Binary download from https://iojs.org/dist/v3.3.1/iojs-v3.3.1-linux-x64.tar.xz failed, trying source.
grep: /home/ic/.nvm/.cache/bin/iojs-v3.3.1-linux-x64/iojs-v3.3.1-linux-x64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
mkdir: cannot create directory ‘/home/ic/.nvm/.cache’: Permission denied
creating directory /home/ic/.nvm/.cache/src/iojs-v3.3.1/files failed
Downloading https://iojs.org/dist/v3.3.1/iojs-v3.3.1.tar.xz...
Warning: Failed to create the file 
Warning: /home/ic/.nvm/.cache/src/iojs-v3.3.1/iojs-v3.3.1.tar.xz: No such file 
Warning: or directory
                                                                           0.1%
curl: (23) Failed writing body (0 != 16037)
Binary download from https://iojs.org/dist/v3.3.1/iojs-v3.3.1.tar.xz failed, trying source.
grep: /home/ic/.nvm/.cache/src/iojs-v3.3.1/iojs-v3.3.1.tar.xz: No such file or directory
Provided file to checksum does not exist.

_-_-_-_-_-_-_-_-_-_-_-_-_

$ nvm debug
nvm --version: v0.33.8
$SHELL: /bin/bash
$HOME: /home/ic
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)'
uname -a: 'Linux 4.13.0-32-generic #35~16.04.1-Ubuntu SMP Thu Jan 25 10:13:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux'
OS version: Ubuntu 16.04.3 LTS  
curl: /usr/bin/curl, curl 7.47.0 (x86_64-pc-linux-gnu) libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
wget: /usr/bin/wget, GNU Wget 1.17.1 built on linux-gnu.
git: /usr/bin/git, git version 2.7.4
grep: /bin/grep (grep --color=auto), grep (GNU grep) 2.25
sed: -e expression #1, char 9: Unmatched ) or \)
awk: not an option: --version
awk: , 
sed: /bin/sed, sed (GNU sed) 4.2.2
cut: /usr/bin/cut, cut (GNU coreutils) 8.25
basename: /usr/bin/basename, basename (GNU coreutils) 8.25
rm: /bin/rm, rm (GNU coreutils) 8.25
sed: -e expression #1, char 9: Unmatched ) or \)
mkdir: , mkdir (GNU coreutils) 8.25
xargs: /usr/bin/xargs, xargs (GNU findutils) 4.7.0-git
nvm current: system
which node: /usr/bin/node
which iojs: 
which npm: /usr/bin/npm
npm config get prefix: /usr
npm root -g: /usr/lib/node_modules

@Natotela it looks like you have a permissions issue; can you file a new issue for that, following the issue template?

I could; Though I've solved the permission issues by 'sudo su root'ing
and working my way there.

On Sun, Feb 4, 2018 at 6:38 PM, Jordan Harband notifications@github.com
wrote:

@Natotela https://github.com/natotela it looks like you have a
permissions issue; can you file a new issue for that, following the issue
template?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/creationix/nvm/issues/818#issuecomment-362920427, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AfqeVhfMI0QdqAjDKoh4M1nq-JkBKnTSks5tRd0FgaJpZM4F38Fw
.

Was this page helpful?
0 / 5 - 0 ratings