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 fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated tar.gz@1.0.7: ⚠️  WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar

> scrypt@6.0.3 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


> scrypt@6.0.3 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 package.json@1.0.0 No description
npm WARN package.json@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the scrypt@6.0.3 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 web3@0.20.0
npm WARN package.json@1.0.0 No description
npm WARN package.json@1.0.0 No repository field.

+ web3@0.20.0
added 4 packages from 6 contributors, removed 276 packages, updated 1 package and audited 127 packages in 4.686s
found 0 vulnerabilities
  • 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 '18 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. – Trevor Lee Oakley Nov 30 '18 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 '18 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 at 14:23
0

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/web3.js@1.0.0-beta.36/dist/web3.min.js"></script>
  • I am not using html. – Trevor Lee Oakley Dec 1 '18 at 1:46
  • 1
    I did not give you a -1 - I appreciate all contributions. – Trevor Lee Oakley Dec 2 '18 at 6:43
  • Dear @Trevor, no problem. – Alireza Zojaji Dec 3 '18 at 8:48
  • Very interesting that there is no way to include a .js file inside the other .js file without using HTML elements. – Alireza Zojaji Dec 3 '18 at 8:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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