Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
a-x- opened this issue Sep 4, 2015 · 6 comments
Labels
installing node Issues with installing node/io.js versions. installing nvm: profile detection Issues with nvm's own install script, related to figuring out the right profile file. needs followup We need some info or action from whoever filed this issue/PR.

Comments

@a-x-
Copy link

a-x- commented Sep 4, 2015

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:
@ljharb
Copy link
Member

ljharb commented Sep 4, 2015

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?

@ljharb ljharb added installing node Issues with installing node/io.js versions. needs followup We need some info or action from whoever filed this issue/PR. labels Sep 4, 2015
@a-x-
Copy link
Author

a-x- commented Sep 5, 2015

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!

@a-x- a-x- closed this as completed Sep 5, 2015
@ljharb ljharb added the installing nvm: profile detection Issues with nvm's own install script, related to figuring out the right profile file. label Sep 5, 2015
@Natotela
Copy link

Natotela commented Feb 4, 2018

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

@ljharb
Copy link
Member

ljharb commented Feb 4, 2018

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

@Natotela
Copy link

Natotela commented Feb 7, 2018 via email

@monaSalih
Copy link

The nvm installed succesfully on my device but when I write mkdir ~/.nvm it show following msg
mkdir: cannot create directory ‘/home/monasalih/.nvm’: File exists
and when write nvm install --lts
show the following

Command 'nvm' not found, did you mean:

  command 'pvm' from deb pvm (3.4.6-2build2)
  command 'kvm' from deb qemu-kvm (1:4.2-3ubuntu6.19)
  command 'nvme' from deb nvme-cli (1.9-1ubuntu0.1)
  command 'vm' from deb mgetty-voice (1.2.1-1)
  command 'nvi' from deb nvi (1.81.6-15build1)
  command 'npm' from deb npm (6.14.4+ds-1ubuntu2)
  command 'nsm' from deb linuxptp (1.9.2-1)
  command 'nvim' from deb neovim (0.4.3-3)
  command 'nm' from deb binutils (2.34-6ubuntu1.3)
  command 'nim' from deb nim (1.0.6-1)
  command 'num' from deb quickcal (2.4-1)
  command 'lvm' from deb lvm2 (2.03.07-1ubuntu1)
  command 'nam' from deb nam (1.15-5build1)

Try: sudo apt install <deb name>

plz how i can fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installing node Issues with installing node/io.js versions. installing nvm: profile detection Issues with nvm's own install script, related to figuring out the right profile file. needs followup We need some info or action from whoever filed this issue/PR.
Projects
None yet
Development

No branches or pull requests

4 participants