Riak和此传输不可用(无protobuf)错误

时间:2012-08-29 03:53:44

标签: python riak

我在ubuntu上使用了riak 1.2,最新版本和来自git hub的riak python api的最新版本。

当我运行此代码时,我收到以下错误。

import riak
client riak.RiakClient(host='riak.hk.myserver.com',port=8087,transport_class=riak.transports.pbc.RiakPbcTransport)

我可以通过端口8087在服务器上远程登录。那么......我该如何解决?

client = riak.RiakClient(host='riak.hk.myserver.com',port=8087,transport_class=riak.transports.pbc.RiakPbcTransport)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/riak-1.5.0-py2.7.egg/riak/client.py", line 78, in __init__
    **transport_options)
  File "/usr/local/lib/python2.7/dist-packages/riak-1.5.0-py2.7.egg/riak/transports/pbc.py", line 168, in __init__
    raise RiakError("this transport is not available (no protobuf)")
riak.RiakError

1 个答案:

答案 0 :(得分:2)

您需要安装riak_pb模块。

git clone https://github.com/basho/riak_pb.git
cd riak_pb
sudo python setup.py install