rebar unable to get dependency from github

你说的曾经没有我的故事 提交于 2019-12-22 04:07:00

问题


I am unable to get any dependency from github using rebar.

rebar.config file:

{sub_dirs, ["rel"]}.

{deps_dir, ["deps"]}.
{erl_opts, [debug_info]}.

{deps, [
 {thrift_erl, "0.5.0", {git, "git://github.com/xslogic/thrift_erl", "HEAD"}}, 
 {eleveldb, "1.0.1", {git, "git://github.com/xslogic/eleveldb", "HEAD"}} 
]}.

When I do ./rebar compile I get:

Dependency not available: thrift_erl-0.5.0 ({git,
                                         "git://github.com/xslogic/thrift_erl",
                                         "HEAD"})
Dependency not available: eleveldb-1.0.1 ({git,
                                       "git://github.com/xslogic/eleveldb",
                                       "HEAD"})

It keeps looking for DEP_NAME with a dash at the end and can't seem to find it.

How to fix this?


回答1:


I think that you should use rebar get-deps command firstly. If rebar compile command is error, try rebar delete-deps, rebar clean. If still error, switch to the related deps directly, compile these project independently. (I have faced this problem one time).




回答2:


You forgot .get as stated before and with versions try to add commit number because they upgrade software and versions so master can point to different version and this breaks deps later.

So change HEAD to commit and set version to this commit or leave HEAD but set version to * (most current one)

This helps a lot later :)




回答3:


You git paths are simply incorrect.

You forget the the ".git" at the end. It should be git://github.com/xslogic/eleveldb.git not git://github.com/xslogic/eleveldb.



来源:https://stackoverflow.com/questions/10059579/rebar-unable-to-get-dependency-from-github

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!