Estou tentando instalar o Truffle usando o comando:
npm install -g truffle
Mas acho que não está tentando me instalar porque não tenho permissão de gravação em algum diretório.
Eu tentei fazer chmod -R 777
para esse diretório ainda falha. Por favor, encontre os registros anexados.
Eu fiquei sem opções e tentei muito, mas ainda em vão. Eu até tentei com o usuário root.
Registros abaixo
48678 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle false
48679 verbose lifecycle [email protected]~install: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/cnilesh/node_modules/wrtc/node_modules/.bin:/home/cnilesh/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
48680 verbose lifecycle [email protected]~install: CWD: /home/cnilesh/node_modules/wrtc
48681 silly lifecycle [email protected]~install: Args: [ '-c', 'node-pre-gyp install --fallback-to-build' ]
48682 silly lifecycle [email protected]~install: Returned: code: 1 signal: null
48683 info lifecycle [email protected]~install: Failed to exec install script
48684 verbose unlock done using /root/.npm/_locks/staging-396c500219e9b6f5.lock for /home/cnilesh/node_modules/.staging
48685 warn enoent ENOENT: no such file or directory, open '/home/cnilesh/package.json'
48686 verbose enoent This is related to npm not being able to find a file.
48687 warn cnilesh No description
48688 warn cnilesh No repository field.
48689 warn cnilesh No README data
48690 warn cnilesh No license field.
48691 verbose stack Error: [email protected] install: 'node-pre-gyp install --fallback-to-build'
48691 verbose stack Exit status 1
48691 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
48691 verbose stack at emitTwo (events.js:125:13)
48691 verbose stack at EventEmitter.emit (events.js:213:7)
48691 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
48691 verbose stack at emitTwo (events.js:125:13)
48691 verbose stack at ChildProcess.emit (events.js:213:7)
48691 verbose stack at maybeClose (internal/child_process.js:897:16)
48691 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
48692 verbose pkgid [email protected]
48693 verbose cwd /home/cnilesh
48694 verbose Linux 4.4.0-31-generic
48695 verbose argv "/usr/bin/nodejs" "/usr/local/bin/npm" "install" "truffle"
48696 verbose node v8.1.2
48697 verbose npm v5.0.3
48698 error code ELIFECYCLE
48699 error errno 1
48700 error [email protected] install: 'node-pre-gyp install --fallback-to-build'
48700 error Exit status 1
48701 error Failed at the [email protected] install script.
48701 error This is probably not a problem with npm. There is likely additional logging output above.
48702 verbose exit [ 1, true ]