简体   繁体   English

钢筋无法从 github 获取依赖项

[英]rebar unable to get dependency from github

I am unable to get any dependency from github using rebar.我无法使用钢筋从 github 获得任何依赖项。

rebar.config file: rebar.config文件:

{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:当我这样做时./rebar compile 我得到:

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.它一直在寻找末尾带有破折号DEP_NAME ,但似乎找不到。

How to fix this?如何解决这个问题?

I think that you should use rebar get-deps command firstly.我认为您应该首先使用rebar get-deps命令。 If rebar compile command is error, try rebar delete-deps , rebar clean .如果 rebar 编译命令出错,请尝试rebar delete-depsrebar clean If still error, switch to the related deps directly, compile these project independently.如果还是报错,直接切换到相关deps,独立编译这些工程。 (I have faced this problem one time). (我曾经遇到过这个问题)。

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.您忘记了。如前所述,对于版本尝试添加提交号,因为它们会升级软件和版本,因此 master 可以指向不同的版本,这会在以后破坏 deps。

So change HEAD to commit and set version to this commit or leave HEAD but set version to * (most current one)因此,将HEAD更改为提交并将版本设置为此提交或保留 HEAD 但将版本设置为 *(最新版本)

This helps a lot later:)这对以后有很大帮助:)

You git paths are simply incorrect.你 git 路径根本不正确。

You forget the the ".git" at the end.你忘记了最后的“.git”。 It should be git://github.com/xslogic/eleveldb.git not git://github.com/xslogic/eleveldb .它应该是git://github.com/xslogic/eleveldb.git而不是git://github.com/xslogic/eleveldb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM