I am running into permission issues when I try to install truffle
avi@avi-Inspiron-3542:~$ sudo npm install -g truffle /usr/bin/truffle -> /usr/lib/node_modules/truffle/build/cli.bundled.js [email protected] install /usr/lib/node_modules/truffle/node_modules/keccak npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."
[email protected] rebuild /usr/lib/node_modules/truffle/node_modules/keccak node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/home/avi/.node-gyp/11.6.0" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/truffle/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/lib/node_modules/truffle/node_modules/keccak/.node-gyp' gyp ERR! System Linux 4.15.0-29-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/lib/node_modules/truffle/node_modules/keccak gyp ERR! node -v v11.6.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] rebuild: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] rebuild 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! /home/avi/.npm/_logs/2019-01-05T10_04_02_789Z-debug.log Keccak bindings compilation fail. Pure JS implementation will be used. + [email protected] added 90 packages from 305 contributors in 7.547s
ls -lHfnpm install -g truffle?npm install truffle