Not able to install Solidity in Ubuntu

0 votes

I am trying to install solidity on my system (Ubuntu 16). I am running the following command:

sudo npm install -g solc​

I am getting this error:

/usr/local/bin/solcjs -> /usr/local/lib/node_modules/solc/solcjs


> keccak@1.4.0 install /usr/local/lib/node_modules/solc/node_modules/keccak

> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."



> keccak@1.4.0 rebuild /usr/local/lib/node_modules/solc/node_modules/keccak

> node-gyp rebuild


gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/user/.node-gyp/8.10.0"

gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/solc/node_modules/keccak/.node-gyp"

gyp WARN install got an error, rolling back install

gyp WARN install got an error, rolling back install

gyp ERR! configure error

gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/solc/node_modules/keccak/.node-gyp'

gyp ERR! System Linux 4.15.0-42-generic

gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! cwd /usr/local/lib/node_modules/solc/node_modules/keccak

gyp ERR! node -v v8.10.0

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! keccak@1.4.0 rebuild: `node-gyp rebuild`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the keccak@1.4.0 rebuild script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Keccak bindings compilation fail. Pure JS implementation will be used.

+ solc@0.5.1

added 76 packages from 30 contributors in 26.079s

How to solve this or how to install solidity?

Dec 12, 2018 in Blockchain by slayer
• 29,050 points
196 views

1 answer to this question.

0 votes

Use this instead:

sudo snap install solc​
answered Dec 12, 2018 by slayer
• 29,050 points

Related Questions In Blockchain

0 votes
1 answer
0 votes
1 answer

Blockchain peer not able to min block in Azure.

After trying out various ideas, making sure ...READ MORE

answered Aug 20, 2018 in Blockchain by Perry
• 17,010 points
26 views
0 votes
1 answer

Not able to invoke a contract in Ethereum Private chain using geth

Hope this helps: contract mortal { /* ...READ MORE

answered Oct 22, 2018 in Blockchain by Omkar
• 67,120 points
35 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
• 67,120 points
190 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
105 views
+1 vote
3 answers

Removing double quotes from a string from JSON response in PHP

Just remove the json_encode call, and it should work: $resp ...READ MORE

answered Sep 12, 2018 in Blockchain by digger
• 27,620 points
2,105 views
0 votes
1 answer
+1 vote
5 answers

How to solve "truffle: command not found" error in blockchain?

First try restarting the system and then ...READ MORE

answered Jul 16, 2018 in Blockchain by slayer
• 29,050 points
672 views
0 votes
1 answer

How to solve "error trying install composer runtime" in Hyperledger composer?

I think the docker-compose tool is not ...READ MORE

answered Jul 17, 2018 in Blockchain by slayer
• 29,050 points
66 views