Cookie Consent by Free Privacy Policy Generator 📌 Install mutiple Erlang and Elixir with vfox


✅ Install mutiple Erlang and Elixir with vfox


💡 Newskategorie: Programmierung
🔗 Quelle: dev.to

vfox (version-fox) is a popular general version management tool write in Go, and the plug-in mechanism uses Lua to achieve extensibility. At present, vfox has supported the management of most mainstream programming language versions, and the ecosystem is quite strong. Here you can see the programming language versions and tools that vfox currently supports and manages -> vfox-Available Plugins.

The Elixir and Erlang communities have long been popular for installing and managing multi-version environments through asdf. asdf is also a general-purpose version management tool, and the ecosystem is so rich.

Vfox is very similar to asdf-vm in that it uses .tool-versions file to manage project-level and global version information. This means that if you've used asdf before, it won't be difficult to switch to vfox. Because the core implementations of vfox and vfox are a bit different, vfox executes nearly 5 times faster than ASDF~, and the official documentation also gives benchmark results: version-fox Comparison with asdf-vm

https://vfox.lhan.me/performence.png

If you've been using asdf to manage and maintain multiple versions of Erlang and Elixir, then vfox is also a good choice for you.

This article will show you how to install and manage multiple versions of Erlang and Elixir via vfox.

Install vfox

vfox (version-fox) is cross OS system friendly, which means it can be used on both Windows and Unix-like systems. The core of this article is to install and manage multiple versions of Erlang and Elixir through vfox. Because the two plug-in implementations of vfox to manage Erlang and Elixir versions do not yet support management under the Windows operating system, the sample environment in this article is mainly the Ubuntu 20.04 Linux environment. Let's get started~

Install vfox (version fox) first:

echo "deb [trusted=yes] https://apt.fury.io/versionfox/ /" | sudo tee /etc/apt/sources.list.d/versionfox.list
sudo apt-get update
sudo apt-get install vfox

In order for vfox to find the installed versions of Elixir and Erlang, vfox needs to be mounted to the shell by default. Next, modify the shell configuration (take Bash as an example):

# Hook your shell
echo 'eval "$(vfox activate bash)"' >> ~/.bashrc

You can also refer to this official documentation to install vfox -> https://vfox.lhan.me/guides/quick-start.html. After installing VFOX, let's install the following plugins:

# add vfox-erlang plugin
vfox add erlang
# add vfox-elixir plugin
vfox add elixir

Next, we can install and manage multiple versions of Erlang and Elixir through the two vfox plugins vfox-erlang and vfox-elixir installed above.

Install Erlang/OTP via the vfox-erlang plugin

Because Elixir depends on Erlang, we need to install Erlang before installing Elixir. Erlang is installed through the source code of the corresponding version, so we need to have the corresponding compilation toolchain, here take Ubuntu 20.04 as an example:

sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk

Now it's time to install Erlang.

# use vfox search get an avaliable version
❯ vfox search erlang
Please select a version of erlang [type to search]: 
->  v25.0.4
   v24.3.4.16
   v24.1.3
   v24.0
   v24.3
   v24.3.2
   v25.2
   v27.0-rc2
   v24.3.4.1
Press ↑/↓ to select and press ←/→ to page, and press Enter to confirm

# you can also specific a version, eg:
vfox install [email protected]

Theoretically, you could install any version that appears in https://github.com/erlang/otp/releases. Since it is compiled and installed from source, the installation process will take some time. When you see the following message, the installation is complete.

compile info.......
...
Install [email protected] success! 
Please use vfox use [email protected] to use it.

Let's use vfox to switch to the Erlang/OTP version we just installed to verify that the installation is successful:

❯ vfox use [email protected]
Now using [email protected].
❯ erl
Erlang/OTP 26 [erts-14.2.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]

Eshell V14.2.2 (press Ctrl+G to abort, type help(). for help)
1> 

If the REPL wakes up correctly, then install it. Let's start installing Elixir.

Install Elixir

Because the installation of Elixir is also compiled and installed from the source code of the corresponding version, the compilation of Elixir needs to depend on Erlang, so we first let the current shell can find the Erlang just installed.

# switch shell to a Erlang version
❯ vfox use [email protected]
Now using [email protected].
# install Elixir
> vfox install [email protected]
.........
.........
Generated ex_unit app
==> logger (compile)
Generated logger app
Generated eex app
==> iex (compile)
Generated iex app
Install [email protected] success! 
Please use vfox use [email protected] to use it.

When you see Install [email protected] success!, it means that the installation has been successful. The installation can be confirmed by IEX as a complete success:

❯ vfox use [email protected]
Now using [email protected].
❯ iex
Erlang/OTP 26 [erts-14.2.2] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit:ns]

Interactive Elixir (1.15.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 

If you want to install a different version of Elixir, please make sure that the current version of Erlang/OTP is compatible with the version of Elixir, check this document to confirm compatibility: 《compatibility-and-deprecations.html#between-elixir-and-erlang-otp》

Set the global usage version

We can use vfox use -g xxx to set the version of Erlang and Elixir that we use by default.

> vfox use -g [email protected]
> vfox use -g [email protected]

# make sure setting succ
> cat ~/.version-fox/.tool-versions 
erlang 26.2.2
elixir 1.15.2

The End

The two plugins for vfox to install and manage the Erlang/OTP and Elixir versions also support managing multiple versions under MacOS Darwin System. You can check out this document for more information: https://github.com/version-fox/vfox-elixir?tab=readme-ov-file#install-in-darwin-macos-13.

Happy & funny!

...

✅ Install mutiple Erlang and Elixir with vfox


📈 107.73 Punkte

✅ (Amazing!) How to manage and install multiple versions of Erlang/OTP and Elixir via vfox in Windows


📈 79.07 Punkte

✅ Installing Erlang With VFOX


📈 51.86 Punkte

✅ Elixir, Erlang, and the BEAM


📈 38.69 Punkte

✅ Open Source Security: GitHub Advisory Database kennt Erlang und Elixir


📈 37.16 Punkte

✅ Open Source Security: GitHub Advisory Database kennt Erlang und Elixir


📈 37.16 Punkte

✅ Open Source Security: GitHub Advisory Database kennt Erlang und Elixir | heise online


📈 37.16 Punkte

✅ Conferências do Ecossistema de Erlang (e Elixir)


📈 37.16 Punkte

✅ Elixir Task, Task.Supervisor - Another way to work with Elixir process


📈 35.94 Punkte

✅ [webapps] - Radiant CMS 1.1.3 - Mutiple Persistent XSS Vulnerabilities


📈 30.19 Punkte

✅ [webapps] - Radiant CMS 1.1.3 - Mutiple Persistent XSS Vulnerabilities


📈 30.19 Punkte

✅ Cisco SD-WAN vManage Mutiple High-Risk Vulnerability Alert


📈 30.19 Punkte

✅ study umi of mutiple environment


📈 30.19 Punkte

✅ Why I selected Elixir and Phoenix as my main stack


📈 19.5 Punkte

✅ For, Map and Reduce in Elixir


📈 19.5 Punkte

✅ SFDCQuery — Building and publishing my first Elixir Library


📈 19.5 Punkte

✅ Elixir: validate map and structs keys for merging at compile time!


📈 19.5 Punkte

✅ Multi-Layered Caching with Decorators in Elixir: Optimizing Performance and Scalability


📈 19.5 Punkte

✅ Parsing and Validating Data in Elixir


📈 19.5 Punkte

✅ Lists and tuples in Elixir


📈 19.5 Punkte

✅ Mobile app development with LiveView Native and Elixir


📈 19.5 Punkte

✅ Mobile app development with LiveView Native and Elixir. Part - 2


📈 19.5 Punkte

✅ Elixir pattern matching - save your time and friendly with our thinking way!


📈 19.5 Punkte

✅ Programmiersprachen: Erlang/OTP 18.3 veröffentlicht


📈 19.19 Punkte

✅ Erlang/OTP bis 17.x CBC Padding POODLE schwache Verschlüsselung


📈 19.19 Punkte

✅ Programmiersprachen: Erlang/OTP 18.3 veröffentlicht


📈 19.19 Punkte

✅ Erlang/OTP bis 17.x CBC Padding POODLE schwache Verschlüsselung


📈 19.19 Punkte

✅ Erlang-OTP 18.x Regular Expression Heap-based Pufferüberlauf


📈 19.19 Punkte

✅ Erlang/OTP: Eine Schwachstelle ermöglicht das Ausspähen von Informationen und die Manipulation von Dateien


📈 19.19 Punkte

✅ Erlang/OTP 20 erschienen: Eine runde Nummer


📈 19.19 Punkte

✅ Erlang/OTP: Eine Schwachstelle ermöglicht das Umgehen von Sicherheitsvorkehrungen


📈 19.19 Punkte

✅ Bugtraq: [SECURITY] [DSA 4057-1] erlang security update


📈 19.19 Punkte

✅ DSA-4057 erlang - security update


📈 19.19 Punkte











matomo

Datei nicht gefunden!