2015-11-02 19 views
0

我的二郎程序的目录结构如下:如何建立和使用epgsql(二郎)

src 
    pgtest.erl 
lib 
    epgsql 
    rebar 

我下载了epgsql库从https://github.com/epgsql/epgsql 然后试图用make这给了我下面的错误来构建它:

make: rebar: Command not found 
make: *** [compile] Error 127 

那么我从https://github.com/basho/rebar下载螺纹钢,并建立它。它成功地建立并给了我信息。

Congratulations! You now have a self-contained script called "rebar" in your current working directory. Place this script anywhere in your path and you can use rebar to build OTP-compliant apps.

所以,按我的理解,我复制从rebar目录rebar脚本我epgsql目录,然后试图再次进行。但是,我得到了同样的错误。我知道我做错了,但不知道该怎么办?

回答

1

您可以在epgsql Makefile [1]中看到,该命令定义的命令仅为rebar。如果它被定义为./rebar那么它会工作把它放在同一个目录中。既然不是这样,你需要把它放在你的PATH的某个地方,因为螺纹钢的产量指示。

包含钢筋本身的Erlang项目通常会指定./rebar,而那些不会期望它位于PATH中的某个位置的项目。

[1] https://github.com/epgsql/epgsql/blob/master/Makefile#L1