NoSQL_Cassandra_运行cqlsh 遇到的问题集

博主今天在搭建Cassandra 2.2.7集群时遇到了一堆问题。


最近迷上了 stack-overflow 和 google。在描述我如何解决遇到的问题的方法,我都尝试以英文进行表述,有问题的同学可以留言联系我。

tips: 英文水平不太好,有表述不准确的地方. 请大家指出,thanks.


Q1,Q2... 等问题存在先后的相关性


Q1:在利用sqlsh 连接 server 时 提示 no appropriate python:

Answer: install python 2.7 +, but python does not provide installer version for linux, so you must complie the source file and install.


Q2:编译安装python 2.7.12

可以直接参考我的另一篇博文(anthor blog):

http://blog.csdn.net/u010003835/article/details/53465032


Answer: 

(1) when compile python 2 .7.12 and install python , you need install some dependency tools first (WTF when 

./configure  there no tips about dependency)  

dependency tools:

1.zlib        2.zlib-devel      3.openssl     4.openssl-devel

you can follow this:

yum install openssl

yum install openssl-devel (solve the zlib & zlib-devel dependencies)


(2)before make && make install, you should  check ./Modules/Setup  (create by configure):

vim Modules/Setup

use     /zlib zlibmo   to search 

#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz

remove annotation(#)   //去掉注释#


编译安装完python后, 需要把安装后的lib 加入到path 环境变量中。

用  python --version 检查是否安装好了



Q3: when use cqlsh to connect cassandra server。

Tips:  pip install cassandra-driver

Answer: You should install pip first. A software like yum:

pip 为类似 yum 一样的管理python包的工具,但是 yum install pip 的版本很低, for python 2.6,

需要从官网上下载  地址:  https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py

download the get-pip.py (just click it, and copy, make sure the postfix is .py)

     python get-pip.py

to install appropriate pip version for your system.

then:

pip -V

to make sure installed complete~

next:

pip install cassandra-driver



Q4:Connection error: ('Unable to connect to any servers', {'localhost': TypeError('ref() does not take keyword arguments',)})

vim /etc/profile

add this:

export CQLSH_NO_BUNDLED=TRUE     

(add what you like after =)

I find the answer use stack-overflow, 哎,博主为了找这个答案, 翻了不下30篇文章,最后还是在stack-overflow上找到了答案,珍爱生命,请用google 和 stack-overflow

这是我在stack-overflow 上找到的原话:

问题地址:http://stackoverflow.com/questions/39703374/cqlsh-typeerrorref-does-not-take-keyword-arguments

NoSQL_Cassandra_运行cqlsh 遇到的问题集_第1张图片











你可能感兴趣的:(NoSQL_Cassandra)