Not able to install truffle

0 votes

I am trying to install on my system using this command:

sudo npm install -g truffle

But I am getting the following error:

npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master https://github.com/debris/bignumber.js.git /home/xxx/.npm/_cacache/tmp/git-clone-f9c59612
npm ERR! /home/xxx/.npm/_cacache/tmp/git-clone-f9c59612/.git: Permission denied
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/xxx/.npm/_logs/2017-06-10T08_24_33_791Z-debug.log

Please help

Jan 29, 2019 in Blockchain by Saloni
2,202 views

1 answer to this question.

+1 vote

This error occurs when there are permission issues for installation. To solve this, you have to install truffle with unsafe permissions:

sudo npm install -g truffle –unsafe-perm

If this doesn’t work, you will have to install the beta version.

sudo npm install -g truffle@beta
answered Jan 29, 2019 by Omkar
• 69,220 points
Hello.

I have the same problem, but I heard that one should avoid sudo if possible (perhaps I am wrong?). Do you perhaps know another solution to this problem?

Thank you for your time

Yoenca

Hi @Yoenca, do the same commands without sudo solve your error?

Related Questions In Blockchain

0 votes
1 answer

Not able to install truffle-contract

There’s a permission error. Run this command ...READ MORE

answered Jan 23, 2019 in Blockchain by Omkar
• 69,220 points
2,298 views
0 votes
1 answer

Hyperledger Composer: not able to install Hyperledger composer-cli

Try setting the PATH like this, export PATH="/usr/local/share/npm/bin:$PATH" Now run the ...READ MORE

answered Oct 31, 2018 in Blockchain by Omkar
• 69,220 points
1,557 views
0 votes
1 answer

Hyperledger Fabric: Not able to install docker

Clean up the invalid package repository: cd ../../etc/apt/sources.list.d sudo ...READ MORE

answered Nov 2, 2018 in Blockchain by Omkar
• 69,220 points
901 views
0 votes
1 answer

Not able to start testrpc for Ethereum truffle

Hey. It seems like you already have ...READ MORE

answered Nov 28, 2018 in Blockchain by Omkar
• 69,220 points
962 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,922 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,426 views
0 votes
1 answer

Not able to install truffle using npm install -g truffle

You need root access to install truffle, ...READ MORE

answered Nov 29, 2018 in Blockchain by Omkar
• 69,220 points
4,434 views
–1 vote
1 answer

Not able to install truffle

I know this is very frustrating, I ...READ MORE

answered Jan 17, 2019 in Blockchain by Omkar
• 69,220 points
4,059 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP