I have 0.20.0 installing but not the default 1.0.0. I have Ubuntu 18.04 installed.
Is any special config needed for Ubuntu 18.04 when installing web3 (1.0.0)?
trevor@bridge2:~$ sudo npm install web3 npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support npm WARN deprecated [email protected]: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar > [email protected] preinstall /home/trevor/node_modules/scrypt > node node-scrypt-preinstall.js Error: Error: Command failed: ./configure configure: error: in `/home/trevor/node_modules/scrypt/scrypt/scrypt-1.2.0': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details > [email protected] install /home/trevor/node_modules/scrypt > node-gyp rebuild gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/trevor/node_modules/scrypt/build' gyp ERR! System Linux 4.15.0-38-generic gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/trevor/node_modules/scrypt gyp ERR! node -v v10.14.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN [email protected] No description npm WARN [email protected] No repository field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install 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/trevor/.npm/_logs/2018-11-30T11_32_53_368Z-debug.log trevor@bridge2:~$ sudo npm install [email protected] npm WARN [email protected] No description npm WARN [email protected] No repository field. + [email protected] added 4 packages from 6 contributors, removed 276 packages, updated 1 package and audited 127 packages in 4.686s found 0 vulnerabilities
sudo apt-get install build-essential
and then install web3. If you are looking to install it globally, runsudo npm install -g web3
. Let me know if it works.