【问题标题】:-bash: cqlsh: command not found ERROR on running cql command outside cqlsh-bash:cqlsh:在cqlsh之外运行cql命令时找不到命令错误
【发布时间】:2021-02-28 23:59:59
【问题描述】:

我在 Linux 上运行以下命令:

cqlsh -u cassandra -p cassandra -e "SELECT rule_name FROM cassandra.table1 ;"

它给出了这个错误:

-bash: cqlsh: command not found

可能的解决方案?

注意:Cassandra 版本 - 3.0.9

【问题讨论】:

  • 只做export PATH=$PATH:path_to_cassandra_install/bin

标签: cassandra cql cqlsh


【解决方案1】:

是的,我在本地也得到了同样的结果:

~/local/apache-cassandra-3.11.6 » cqlsh 127.0.0.1 -u aploetz -p xxxxxxxx
zsh: command not found: cqlsh

就像 Alex 说的,你可以选择路径或者使用明确的位置:

~/local/apache-cassandra-3.11.6 » bin/cqlsh 127.0.0.1 -u aploetz -p xxxxxxxx
Connected to AShowOfHands at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.11.6 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.

【讨论】:

    猜你喜欢
    • 2019-09-21
    • 2020-01-14
    • 2022-07-07
    • 1970-01-01
    • 1970-01-01
    • 2015-05-26
    • 1970-01-01
    • 2017-07-03
    • 2015-06-14
    相关资源
    最近更新 更多