2016-11-21 117 views
1

我把主分支进行了Riak,二郎的客户端,并呼吁make了Riak二郎模块安装错误

./rebar get-deps 
==> meck (get-deps) 
==> protobuffs (get-deps) 
==> hamcrest (get-deps) 
==> riak_pb (get-deps) 
==> riak-erlang-client (get-deps) 
./rebar compile 
==> meck (pre_compile) 
==> meck (compile) 
==> protobuffs (pre_compile) 
==> protobuffs (compile) 
==> hamcrest (pre_compile) 
==> hamcrest (compile) 
==> hamcrest (post_compile) 
==> riak_pb (pre_compile) 
==> riak_pb (compile) 
==> riak-erlang-client (compile) 
[email protected]:~/erlang-git/riak-erlang-client$ erl -pa $PATH_TO_RIAKC/ebin $PATH_TO_RIAKC/deps/*/ebin 
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false] 

Eshell V7.3 (abort with ^G) 
1> code:which(riakc_pb_socket). 
non_existing 

也试过

make clean && make all

构建了罚款,但是当我打电话

./rebar install

我看不到在erlang-java-client目录下运行。精做检查,如果安装已经完成下面我跑:

/riak-erlang-client$ erl -pa $PATH_TO_RIAKC/ebin $PATH_TO_RIAKC/deps/*/ebin 
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false] 

Eshell V7.3 (abort with ^G) 
1> code:which(riakc_pb_socket). 
non_existing 

我能做些什么来解决这个错误。提前致谢。

回答

1

~/erlang-git/riak-erlang-client目录,而不是运行此:

erl -pa ./ebin ./deps/*/ebin 

的示例使用$PATH_TO_RIAKC环境变量,以证明如果你从另一个位置运行erl则必须将此变量。由于Erlang客户端及其依赖项的.beam文件可用,因此不需要设置此env变量。

+0

在erl shell中,我运行了'{ok,Pid} = riakc_pb_socket:start_link(“127.0.0.1”,8087).'并得到了“之前的语法错误:{”我应该替换Pid,我应该放哪里? – Raghuveer

+1

该语法错误可能是shell中上一行未完成的命令。试着运行'ok',然后重试你的命令。 – Joe