如何在erlang中安装模块? [英] How do you install a module in erlang?

查看:133
本文介绍了如何在erlang中安装模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Erlang的新手,并且想知道如何安装第三方模块以在我的Web应用程序中使用.

I am new to Erlang and would like to to know how to install third party modules for use in my web application.

您将文件放置在哪里以及执行哪种命令?

Where do you place this files and what sort of commands do you execute?

推荐答案

如果要在系统范围内安装第三方Molib,例如Mochiweb,最好在$ ERL_LIBS环境变量下进行设置.我在此处上写了一点,给出安装常见工具的示例此处.最好不要在Erlang自己的代码库(/usr/lib/erlang/lib)中放置任何内容,但是$ ERL_LIBS内的路径具有相同的行为.那就是它将$ ERL_LIBS/**/ebin添加到代码路径中.

If you wish to install 3rd party libs, like Mochiweb, system wide it's best to set it up under the $ERL_LIBS environment variable. I write a bit about it here and give examples of installing common tools here. It is probably best not to put anything inside Erlang's own code library(/usr/lib/erlang/lib) but the path inside $ERL_LIBS behaves the same way. That is that it adds $ERL_LIBS/**/ebin to the codepath.

但是,您实际上应该只在学习系统时才做这样的事情.为了制作稳定的软件,最好在您的应用程序中包含所有相关代码.另请参阅答案这里了解为什么您希望这样做.

However you should really only do things like this while learning the system. To make stable software it's best to include with your app all the dependent code. Also see the answer here for some insight on to why you may wish for this.

这篇关于如何在erlang中安装模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆