Eos: nodeos,cleos,keosd command not found

Created on 26 Jul 2018  路  21Comments  路  Source: EOSIO/eos

I have installed EOSIO successfully on Mac OS but I still can not run eos commands,
how to fix it?
cd build/programs/nodeos here where I'm running the commands

Support

Most helpful comment

cleos is not a command, you need use ./cleos

All 21 comments

what did you use? Docker or build script

build script

I also had some tests failing :(

Check this out. You have to run the following from your eos code folder:

cd build
sudo make install

I have done this step before and still not working

The following tests FAILED: 29 - nodeos_run_test (Failed) 30 - nodeos_run_remote_test (Failed) 31 - distributed-transactions-test (Failed) 32 - distributed-transactions-remote-test (Failed) 33 - restart-scenarios-test_hard_replay (Failed) Errors while running CTest Makefile:119: recipe for target 'test' failed make: * [test] Error 8

build script was without error?

@liderako

make install
[ 1%] Built target binaryen
[ 4%] Built target passes
[ 4%] Built target wasm
[ 5%] Built target support
[ 5%] Built target ast
[ 5%] Built target asmjs
[ 6%] Built target cfg
[ 6%] Built target eosio-s2wasm
[ 6%] Built target emscripten-optimizer
[ 10%] Built target fc
[ 11%] Built target test_cypher_suites
[ 11%] Built target builtins
[ 32%] Built target softfloat
[ 32%] Built target chainbase
[ 32%] Built target chainbase_test
[ 32%] Built target Platform
[ 32%] Built target Logging
[ 32%] Built target IR
[ 33%] Built target Runtime
[ 33%] Built target Emscripten
[ 34%] Built target WASM
[ 34%] Built target WAST
[ 34%] Built target eosio-wast2wasm
[ 35%] Built target wavm
[ 35%] Built target Test
[ 35%] Built target Disassemble
[ 36%] Built target eos_utilities
[ 37%] Built target appbase
[ 37%] Built target appbase_example
[ 39%] Built target eosio_chain
[ 39%] Built target eosiolib
[ 77%] Built target libc
[ 79%] Built target libc++
[ 80%] Built target eosio.bios
[ 81%] Built target eosio_testing
[ 81%] Built target abi_generator
[ 82%] contract...
[ 82%] Built target copy_skeleton_contract
[ 83%] Built target simple.token
[ 83%] Built target eosio.token
[ 83%] Built target eosio.msig
[ 83%] Built target eosio.sudo
[ 84%] Built target multi_index_test
[ 85%] Built target eosio.system
[ 85%] Built target identity_common
[ 86%] Built target identity
[ 87%] Built target identity_interface
[ 87%] Built target identity_test
[ 88%] Built target stltest
[ 88%] Built target test_exchange
[ 88%] Built target exchange
[ 88%] Built target test.inline
[ 89%] Built target hello
[ 89%] Built target asserter
[ 90%] Built target infinite
[ 90%] Built target proxy
[ 91%] Built target test_api
[ 92%] Built target test_api_mem
[ 92%] Built target test_api_db
[ 92%] Built target test_api_multi_index
[ 92%] Built target test_ram_limit
[ 93%] Built target noop
[ 94%] Built target dice
[ 95%] Built target tic_tac_toe
[ 95%] Built target payloadless
[ 95%] Built target chain_plugin
[ 95%] Built target bnet_plugin
[ 95%] Built target http_client_plugin
[ 95%] Built target producer_plugin
[ 95%] Built target net_plugin
[ 95%] Built target http_plugin
[ 95%] Built target net_api_plugin
[ 95%] Built target chain_api_plugin
[ 95%] Built target producer_api_plugin
[ 95%] Built target history_plugin
[ 95%] Built target history_api_plugin
[ 96%] Built target wallet_plugin
[ 96%] Built target wallet_api_plugin
[ 96%] Built target txn_test_gen_plugin
[ 96%] Built target db_size_api_plugin
[ 96%] Built target mongo_db_plugin
[ 96%] Built target login_plugin
[ 96%] Built target nodeos
[ 96%] Built target cleos
[ 96%] Built target keosd
[ 96%] Built target eosio-launcher
[ 96%] Built target eosio-abigen
[ 96%] Built target deferred_test
[ 98%] Built target unit_test
[ 98%] Built target plugin_test
[100%] Built target print_floats
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /usr/local/eosio/etc/eosio
CMake Error at cmake_install.cmake:44 (file):
file INSTALL cannot set permissions on "/usr/local/eosio/etc/eosio"

You don't have any commands or bin? Please run command ${eos_PATH} /build/programs/nodeos and write output ls, here

Last login: Thu Jul 26 18:34:17 on ttys000
Nazims-MacBook-Pro:~ nazimfaour$ /Users/nazimfaour/eos/build/programs/cleos/cleos ; exit;
ERROR: RequiredError: Subcommand required
Command Line Interface to EOSIO Client
Usage: /Users/nazimfaour/eos/build/programs/cleos/cleos [OPTIONS] SUBCOMMAND

Options:
-h,--help Print this help message and exit
-u,--url TEXT=http://127.0.0.1:8888/
the http/https URL where nodeos is running
--wallet-url TEXT=http://127.0.0.1:8900/
the http/https URL where keosd is running
-r,--header pass specific HTTP header; repeat this option to pass multiple headers
-n,--no-verify don't verify peer certificate when using HTTPS
-v,--verbose output verbose actions on error
--print-request print HTTP request to STDERR
--print-response print HTTP response to STDERR

Subcommands:
version Retrieve version information
create Create various items, on and off the blockchain
get Retrieve various items and information from the blockchain
set Set or update blockchain state
transfer Transfer EOS from account to account
net Interact with local p2p network connections
wallet Interact with local wallet
sign Sign a transaction
push Push arbitrary transactions to the blockchain
multisig Multisig contract commands
sudo Sudo contract commands
system Send eosio.system contract action to the blockchain.
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Last login: Thu Jul 26 18:38:14 on ttys001
Nazims-MacBook-Pro:~ nazimfaour$ /Users/nazimfaour/eos/build/programs/nodeos/nodeos ; exit;
2018-07-26T15:38:55.343 thread-0 chain_plugin.cpp:271 plugin_initialize ] initializing chain plugin
2018-07-26T15:38:55.350 thread-0 chain_plugin.cpp:580 plugin_initialize ] 13 St13runtime_error: database dirty flag set
rethrow database dirty flag set:
{"what":"database dirty flag set"}
thread-0 chain_plugin.cpp:580 plugin_initialize
Failed to initialize
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

This is the problem:

Nazims-MacBook-Pro:~ nazimfaour$ cd eos
Nazims-MacBook-Pro:eos nazimfaour$ cd build
Nazims-MacBook-Pro:build nazimfaour$ cd programs
Nazims-MacBook-Pro:programs nazimfaour$ cd cleos
Nazims-MacBook-Pro:cleos nazimfaour$ cleos
-bash: cleos: command not found
Nazims-MacBook-Pro:cleos nazimfaour$ cleos create wallet
-bash: cleos: command not found

cleos is not a command, you need use ./cleos

if you want, used cleos you'll need add alias (source)

#NODEOS
alias nodeos=YOURPATH/build/programs/nodeos
#CLEOS
alias cleos=YOURPATH/build/programs/cleos
#KEOSD
alias keosd=YOURPATH/build/programs/keosd
#EOSIOCPP
alias eosiocpp=YOURPATH/build/tools/eosiocpp

@Nazeim regarding this build error:

CMake Error at cmake_install.cmake:44 (file):
file INSTALL cannot set permissions on "/usr/local/eosio/etc/eosio"

Did you try sudo make install instead of make install?

@liderako I think running sudo make install on the build folder creates all the alias you need.

when I'm trying to run this command:
./nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --contracts-console

I get this result:
2018-07-26T15:55:32.935 thread-0 wallet_plugin.cpp:42 plugin_initialize ] initializing wallet plugin 2018-07-26T15:55:32.940 thread-0 se_wallet.cpp:286 check_signed ] Application does not have a valid signature; Secure Enclave support disabled 2018-07-26T15:55:32.944 thread-0 http_plugin.cpp:344 plugin_initialize ] configured http to listen on 127.0.0.1:8888 2018-07-26T15:55:32.945 thread-0 chain_plugin.cpp:271 plugin_initialize ] initializing chain plugin 2018-07-26T15:55:32.946 thread-0 chain_plugin.cpp:580 plugin_initialize ] 13 St13runtime_error: database dirty flag set rethrow database dirty flag set: {"what":"database dirty flag set"} thread-0 chain_plugin.cpp:580 plugin_initialize 2018-07-26T15:55:32.947 thread-0 main.cpp:118 main ] database dirty flag set (likely due to unclean shutdown): replay required

it's just a nightmare

@Nazeim your database dirty)

Your database is dirty. Very likely because of a non-graceful shutdown previously (you might need to give more timeout to your docker stop).
Try to replay it and fix irreversible blocks by adding the following args --replay --fix-reversible-blocks

4829

sudo make install does not currently install to a location in the default path in most distributions. Instead, it installs to /usr/local/eosio/bin. This is expected to be corrected in a later release. You can edit your path in the current terminal session to allow you to run commands as you expect:

export PATH=$PATH:/usr/local/eosio/bin

To make the change permanent, add it to your ~/.profile.

echo 'PATH=$PATH:/usr/local/eosio/bin/' >> ~/.profile
source ~/.profile

@jgiszczak @liderako @sergmetelin
I still have the same problem, I can not Launch a Single Node Testnet,
is it necessary to deploy the smart contract or not ?

Nazims-MacBook-Pro:nodeos nazimfaour$ ./nodeos 2018-07-27T12:46:55.976 thread-0 chain_plugin.cpp:271 plugin_initialize ] initializing chain plugin 2018-07-27T12:46:55.979 thread-0 chain_plugin.cpp:580 plugin_initialize ] 13 St13runtime_error: database dirty flag set rethrow database dirty flag set: {"what":"database dirty flag set"} thread-0 chain_plugin.cpp:580 plugin_initialize Failed to initialize Nazims-MacBook-Pro:nodeos nazimfaour$ ./nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --contracts-console 2018-07-27T12:47:01.903 thread-0 wallet_plugin.cpp:42 plugin_initialize ] initializing wallet plugin 2018-07-27T12:47:01.906 thread-0 se_wallet.cpp:286 check_signed ] Application does not have a valid signature; Secure Enclave support disabled 2018-07-27T12:47:01.907 thread-0 http_plugin.cpp:344 plugin_initialize ] configured http to listen on 127.0.0.1:8888 2018-07-27T12:47:01.907 thread-0 chain_plugin.cpp:271 plugin_initialize ] initializing chain plugin 2018-07-27T12:47:01.907 thread-0 chain_plugin.cpp:580 plugin_initialize ] 13 St13runtime_error: database dirty flag set rethrow database dirty flag set: {"what":"database dirty flag set"} thread-0 chain_plugin.cpp:580 plugin_initialize 2018-07-27T12:47:01.908 thread-0 main.cpp:118 main ] database dirty flag set (likely due to unclean shutdown): replay required Nazims-MacBook-Pro:nodeos nazimfaour$

@liderako @jgiszczak @sergmetelin
I solved the problem and now the testnet is Running.
I done this:

  1. pkill nodeos
  2. kill `pidof nodeos`
  3. ./nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --delete-all-blocks.

but I got another error while trying to set a contract:
I'm doing it locally not in docker

./cleos set contract eosio build/contracts/eosio.bios -p eosio@active
Reading WAST/WASM from build/contracts/eosio.bios/eosio.bios.wast...
Error 3160009: No wast file found
Error Details:
no wast file found build/contracts/eosio.bios/eosio.bios.wast

The path in the tutorial is a relative path. You need to be in your eos directory for it to work as written. If you ran it from build/programs/cleos, as it appears you are, you need to modify it as follows:
./cleos set contract eosio ../../contracts/eosio.bios -p eosio@active

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hsejin314 picture hsejin314  路  3Comments

christola picture christola  路  3Comments

ResponsiveWebApps picture ResponsiveWebApps  路  3Comments

hadramidah picture hadramidah  路  3Comments

xiaomaogy picture xiaomaogy  路  3Comments