0

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
4
  • 1
    Run sudo apt-get install build-essential and then install web3. If you are looking to install it globally, run sudo npm install -g web3. Let me know if it works.
    – Aniket
    Nov 30, 2018 at 12:34
  • I get a weird error - Error: Error: Command failed: ./configure ./configure: line 1904: config.log: Permission denied ./configure: line 1914: config.log: Permission denied even as root. Nov 30, 2018 at 13:40
  • @TrevorOakley Check the file permissions, I've seen the case where the files have the wrong permission when compiling as root.
    – Ismael
    Dec 2, 2018 at 5:44
  • if you use sudo to install packages, you will get "EACCES: permission denied" error next time when you install packages, because those packages installed via sudo will have root as their owner, instead of you being the owner
    – Russo
    Jan 13, 2019 at 14:23

2 Answers 2

1

if you use sudo to install packages, you will get "EACCES: permission denied" error next time when you install packages, because those packages installed via sudo will have root as their owner, instead of you being the owner.

install web3.js via yarn:

$ yarn add web3 --dev

-1

No installation needed.

You should only use a source of web3.js 1.0.0 from one of its hosts in your HTML file. for exmaple:

<script language="javascript" src="https://cdn.jsdelivr.net/gh/ethereum/[email protected]/dist/web3.min.js"></script>
5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.