我有一个erlang项目,我将为它生成一个独立的erlang脚本,为此我使用了rebar escriptize,添加了中的所有依赖项和其他一些选项,如您所见。
{erl_opts, [{parse_transform, lager_transform}]}.
{lib_dirs,["deps"]}.
{deps, [
{'lager', ".*", {
git, "git://github.com/basho/lager.git", {tag, "2.0.0"}}
},
{'cowboy', ".*", {
git, "git://github.com/ninenines/cowboy.git", {tag, "2.0.0-pre.1"}}
},
{'jsx', ".*", {
git, "git://github.com/talentdeficit/jsx.git", {tag, "v2.0.4"}}
}
]}.
{escript_emu_args, "%%! -smp auto\n"}.
{escript_emu_args, "%%! -pz ../dir-of-some-beams\n"}.
{escript_name, "multiscreen_ws_app"}.
{escript_incl_apps, [sasl,stdlib,kernel,ranch,crypto,cowlib,cowboy,asn1,public_key,ssl,jsx,compiler ,syntax_tools,lager,goldrush]}.当然,我已经在我的主模块中创建了一个主方法来启动脚本。当我使用escript multiscreen_ws_app命令运行generetaed脚本时,我看到我的程序输出很好,但是当我收到我的第一个websocket页面并试图解密它时,它就不工作了,我得到了消息:
17:03:30.222 [error] Unable to load crypto library. Failed with error:
"load_failed, Failed to load NIF library c:/Users/alessandro.herculano/Music/mul
tiscreen_ws_app/crypto/priv/lib/crypto: 'Couldn't load the specified method
ecificado.'"
OpenSSL might not be installed on this system.奇怪的是,它试图搜索我的脚本文件,就像它是一个文件夹!c:/Users/alessandro.herculano/Music/multiscreen_ws_app/crypto/priv/lib/crypto但是multiscreen_ws_app是我的脚本文件!我能做什么让我的脚本搜索它在另一个预定义的位置?
发布于 2015-10-06 20:23:52
刚刚找到的解决方案,我的错,只需删除“密码”从escript_incl_apps列表解决问题。
https://stackoverflow.com/questions/32978933
复制相似问题