2016-11-21 109 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