rebar unable to get dependency from github
Asked Answered
B

3

10

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?

Blasius answered 8/4, 2012 at 0:52 Comment(0)
C
30

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).

Cobbett answered 8/4, 2012 at 1:35 Comment(1)
Make sure you enter sudo rebar get-depsIrresistible
N
1

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 :)

Neoimpressionism answered 11/4, 2012 at 15:40 Comment(0)
N
0

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.

Nationwide answered 10/4, 2012 at 9:49 Comment(2)
It worked after deleting the deps and getting them again. The paths are not complete but they do work with rebar.Blasius
To be precise; GitHub allows you to clone from either. Other Git providers may not be as forgiving.Sharie

© 2022 - 2024 — McMap. All rights reserved.