ERROR while installing Edge Impulse CLI in Ubuntu 20.04 LTS machine

Hi! :wave:
I was installing Edge Impulse CLI on my Windows device and it didn’t cause any errors. While I was trying to do the same on my Ubuntu machine I got this -
npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see
npm WARN deprecated request@2.88.2: request has been deprecated, see
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN checkPermissions Missing write access to /usr/local/lib
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib’
npm ERR! { [Error: EACCES: permission denied, access ‘/usr/local/lib’]
npm ERR! stack:
npm ERR! ‘Error: EACCES: permission denied, access ‘/usr/local/lib’’,
npm ERR! errno: -13,
npm ERR! code: ‘EACCES’,
npm ERR! syscall: ‘access’,
npm ERR! path: ‘/usr/local/lib’ }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/arijit/.npm/_logs/2020-12-17T10_19_50_892Z-debug.log

Note that this is a first time installation process and I have NodeJs version 10.19.0 .
I tried uninstalling and reinstallation but it didn’t work. Can anyone help me solve this issue ?

Hi @arijit_das_student,

Your user doesn’t have access to /usr/local/lib/.

Can you try running: npm config set user root and reinstall?

As an alternative you can also change owner of this directory with: sudo chown -R $USER /usr/local/lib


Hey @aurel! :wave:
Well I tried it by the commands you laid out…but sadly nothing work out…it again gave the same error. :confused:
Is there anything else by which I can make this work ?

I believe your Ubuntu machine does not have use administrator permissions:
You can change the permissions by:

  • Open the Activities overview and start typing Users.

  • Click Users to open the panel.

  • Press Unlock in the top right corner and type in your password when prompted.

  • Select the user whose privileges you want to change.

  • Click the label Standard next to Account Type and select Administrator.

  • The user’s privileges will be changed when they next log in.

So, I went doing the same thing on Ubuntu, and found that the below command is the best to configure your ubuntu machine to use root/Administrator:

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

After this, run both the commands again, for the edgeimpulse-cli, as well as arduino cli

Let me know if this helps :smiley:

1 Like

Good thing! Finally it worked out…although I had to do it via another method…I don’t know why the command in the terminal didn’t work out…Had to create another account and give Admin access it and then logged in to the first account and made it the Admin too. And finally it works! :star_struck::love_you_gesture:

Thanks for the help @aurel and @dhruvsheth ! :slightly_smiling_face:

1 Like