【问题标题】:Riak Erlang module installation errorRiak Erlang 模块安装错误
【发布时间】:2017-04-05 04:31:06
【问题描述】:

我将 riak-erlang-client 的 master 分支称为 make

   ./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)
raghuveer@ubuntu:~/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

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

【问题讨论】:

    标签: erlang riak


    【解决方案1】:

    ~/erlang-git/riak-erlang-client 目录,改为运行:

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

    示例使用$PATH_TO_RIAKC 环境变量来演示如果您从其他位置运行erl,则必须设置此变量。由于 Erlang 客户端及其依赖项的 .beam 文件可用,因此您不需要设置此环境变量。

    【讨论】:

    • 在 erl shell 中我运行 {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087). 并得到“之前的语法错误:{”我应该替换 Pid,我应该放什么?
    • 该语法错误可能是 shell 上一行中未完成的命令。尝试只运行ok.,然后重试您的命令。
    猜你喜欢
    • 1970-01-01
    • 2019-02-06
    • 2011-02-23
    • 1970-01-01
    • 2016-07-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多