Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Installation CentOS 7.2上未安装Cassandra上的cqlsh_Installation_Cassandra 2.0_Centos7_Cqlsh - Fatal编程技术网

Installation CentOS 7.2上未安装Cassandra上的cqlsh

Installation CentOS 7.2上未安装Cassandra上的cqlsh,installation,cassandra-2.0,centos7,cqlsh,Installation,Cassandra 2.0,Centos7,Cqlsh,我安装了cassandra,但没有看到cqlsh。我有一条巨蟒,所以我从那里安装了cqlsh pip install cqlsh Successfully installed cqlsh-5.0.3 当我尝试连接到cassandra时,我得到了这个错误 [idf@node1 sbin]$ cqlsh 10.0.0.60 Connection error: ('Unable to connect to any servers', {'10.0.0.60': ProtocolError("cql

我安装了
cassandra
,但没有看到
cqlsh
。我有一条巨蟒,所以我从那里安装了
cqlsh

pip install cqlsh 
Successfully installed cqlsh-5.0.3
当我尝试连接到cassandra时,我得到了这个错误

[idf@node1 sbin]$ cqlsh 10.0.0.60
Connection error: ('Unable to connect to any servers', {'10.0.0.60': ProtocolError("cql_version '3.3.1' is not supported by remote (w/ native protocol). Supported versions: [u'3.1.7']",)})

[idf@node1 sbin]$ cqlsh 10.0.0.60 9160
Connection error: ('Unable to connect to any servers', {'10.0.0.60': ConnectionShutdown('Connection <AsyncoreConnection(140356880106448) 10.0.0.60:9160 (closed)> is already closed',)})
[idf@node1 sbin]$ 
[idf@node1sbin]$cqlsh 10.0.0.60
连接错误:(‘无法连接到任何服务器’,{'10.0.0.60':协议错误(“远程(w/本机协议)不支持cql_版本‘3.3.1’)。支持的版本:[u'3.1.7'],))
[idf@node1sbin]$cqlsh 10.0.0.60 9160
连接错误:(‘无法连接到任何服务器’,{'10.0.0.60':ConnectionShutdown(‘连接已关闭’,)})
[idf@node1sbin]$

我在哪里可以找到来自datastax的cassandra附带的cqlsh?或者,如果上述功能正常,我需要做什么?

尝试以下方式连接:

$cqlsh 10.0.0.60 9042-u-p--cqlversion=“3.1.7”


如果系统中预先安装了anaconda2,
cqlsh
无法工作,因为它无法导入
cqlshlib
。首先,您必须在anaconda内部安装
cqlsh
,然后用系统级安装的覆盖
cqlshlib

pip install cqlsh
find /usr/lib/ -name cqlshlib | xargs cp -R -t ~/anaconda2/lib/python2.7/site-packages/cqlshlib/

该错误是因为您安装的cqlsh与服务器不匹配。你是如何安装卡桑德拉的?我不知道有哪种方式不包括cqlsh。也许它不在你的路径中。不,问题是我安装了anaconda,CentOS python稍后会出现在路径中。因此,它正在捕捉蟒蛇。由于站点包使用的是系统python,因此无法正常工作。如果我尝试安装cqlsh的anaconda版本,则存在版本不兼容的问题。令人沮丧。我通过将cqlsh目录复制到anaconda站点包目录解决了这个问题