简体   繁体   中英

how can i using mix(Elixir) install package install to system?

I just want run IEx to require this package, I do not want create a mix project and into the deps.

For example, gem install bundle

How do I do this?

As I understood, mix archive.install is useful to install archives that will provide mix tasks. What you could do is to put all the .beam files in a repository that will be specified at iex/elixir startup (with the -pa $CUSTOMPATH option). This will load the .beam files during elixir startup.

For instance, in the elixir shell script, there is this line:

exec "$ERL_PATH" -pa "$SCRIPT_PATH"/../lib/*/ebin $ELIXIR_ERL_OPTIONS $ERL -extra "$@"

You can add an additional `-pa ~/.local/ebin" to load those .beam file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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