Is there an alias or PATH that we need to set for eosio-cpp to be accessible?

Here's what I'm seeing:

~/eos/contracts/youvote $ eosio-cpp --help eosio-cpp: command not found

I can access it via:

~/eos/contracts/youvote $ sudo /usr/local/eosio.cdt/bin/eosio-cpp --help [sudo] password for user: OVERVIEW: eosio-cpp (Eosio C++ -> WebAssembly compiler) USAGE: eosio-cpp [options] <input file> ...

But, it's dangerous to run sudo for this script. Should the executable eosio-cpp be placed in a different folder or called some other way without sudo?

Thanks -Gunnar

  • I'm on Ubuntu 18.04 – Gunnar Pope Sep 23 '18 at 14:49

I needed to add read write permission to the eosio-cpp folder for non-sudo access.

$ sudo chmod 755 /usr/local/eosio.cdt/bin/eosio-cpp

and that solved it.

| improve this answer | |

According to this link, in order to make tools accessible anywhere, you have to run:

sudo ./install.sh
| improve this answer | |
  • 1
    Thanks, kolkhi. I found out that I had to add read and execute permissions to the eosio-cpp folder using `$ sudo chmod 755 /usr/local/eosio.cdt/bin/eosio-cpp' – Gunnar Pope Sep 24 '18 at 14:09
  • updated doc link developers.eos.io/eosio-home/docs – Abdul Manan Feb 6 '19 at 8:02

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.