bitcore icon indicating copy to clipboard operation
bitcore copied to clipboard

./scripts/download: line 44: bitcoin-0.12.1-linux64.tar.gz: Permission denied

Open toponerdong opened this issue 9 years ago • 11 comments

I tried to install bitcore via npm, but get this error, anyone know how to fix it??? it is a centos 7

thanks in advance

[root@iZbp14hv8cf5q231f8yzjuZ bitcore]# npm install -g bitcore

[email protected] preinstall /root/.nvm/versions/node/v8.1.2/lib/node_modules/bitcore/node_modules/bitcore-node ./scripts/download

Downloading bitcoin: https://github.com/bitpay/bitcoin/releases/download/v0.12.1-bitcore-4/bitcoin-0.12.1-linux64.tar.gz ./scripts/download: line 44: bitcoin-0.12.1-linux64.tar.gz: Permission denied npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] preinstall: ./scripts/download npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] preinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2017-06-21T10_49_13_855Z-debug.log

toponerdong avatar Jun 21 '17 10:06 toponerdong

got reason, root user is not allowed

toponerdong avatar Jun 21 '17 11:06 toponerdong

Doesn't work with root and ubuntu user either.

Josema avatar Jul 14 '17 12:07 Josema

@toponerdong I have tried almost everything. If I don't use root access, then it is giving error Missing write access to /usr/lib/node_modules and if I use sudo then it gives the error as posted above

rahulanand90 avatar Jul 26 '17 15:07 rahulanand90

i face same issue but look like no support is available

aistore2030 avatar Aug 27 '17 03:08 aistore2030

Following is how you can work this around (documented below how I fixed it for ubuntu)

  • Execute as a ubuntu user (non-root)
  • For each directory, change user from root to ubuntu $ sudo chown ubuntu:staff <directoryName>

Following directories needed changing owner in my case;

  • /usr/local/lib/node_modules [and subdirectories]
  • /usr/local/bin [for creating shortcuts]

raohammad avatar Nov 13 '17 15:11 raohammad

I have encountered this problem。 Just use flowing command:

npm install -g --unsafe-perm=true bitcore

qshuai avatar Dec 13 '17 12:12 qshuai

Can't fix...

root@host:~# npm install -g --unsafe-perm=true bitcore

> [email protected] preinstall /root/.nvm/versions/node/v9.3.0/lib/node_modules/bitcore/node_modules/bitcore-node
> ./scripts/download

Downloading bitcoin: https://github.com/bitpay/bitcoin/releases/download/v0.12.1-bitcore-4/
npm ERR! code ELIFECYCLE
npm ERR! errno 22
npm ERR! [email protected] preinstall: `./scripts/download`
npm ERR! Exit status 22
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-01-08T01_11_58_827Z-debug.log
root@host:~#

ghost avatar Jan 08 '18 01:01 ghost

@qshuai Thanks it work...

zainiafzan avatar Jan 12 '18 06:01 zainiafzan

Hi there,

I had to install nvm to manage node versions. so I switched to nvm use v4.6.2 + chown ubuntu:staff -R

  • /usr/local/lib/node_modules
  • /usr/local/bin

npm install -g --unsafe-perm=true bitcore

and also had to install

apt-get install rpcbind

killed bitcoind and

bitcore start worked :-)

antalika avatar Feb 25 '18 14:02 antalika

@qshuai it worked

CNSumi avatar May 14 '18 04:05 CNSumi

worked too thanks !

oxi049 avatar Nov 15 '18 19:11 oxi049