Installing Elixir 1.16.1 (And Erlang 26.2.1) on Gnu/Linux Debian 12 (Bookworm) from Source Code

I’ve made a video on how to install Erlang (26.2.1) and Elixir (1.16.1) on GNU/Linux Debian 12 (Bookworm).

Thanks!

4 Likes

Honestly? Personally I’m :-1: on this. This is more like how to make Erlang and Elixir compile - not a good way to prepare environment. In modern environments versions managers like asdf are used instead of doing everything by hand and they also allows to compile Erlang and Elixir - not even mentioning that there are up-to-date binary releases. Unfortunately your way you could scare new developers already at the Erlang step. :sweat_smile:

The second thing you are doing wrong is not to use a tools your distribution provides. Yes, version managers like asdf does not handle dependencies by you, but their plugins have usually a simple one line command to install dependencies using apt and that’s more than enough for a new developer to know. :+1:

What a guide like you could do is as said using all helpful stuff your distribution provides. I already gave an example about it here:

In Gentoo btw. it’s even simpler, because *.ebuild files are text files and you don’t have to generate a deb or any other files. :thinking:

The biggest problem with your guide however is how to do update your installed by hand environment. In very short people need to go all over again and ensure everything works which could be fully automated and the update then looks like:

  1. Install distribution updates (using apt for example) :penguin:
  2. Install updates using version manager (using asdf for example) :man_office_worker:

and … that’s it! Story end. You have to spend only “5 min” only once and then you can the time you saved on more (or less) productive things. :pizza:

3 Likes

Eiji!

Honestly? Personally I’m :-1: on this.

Thanks for your weigh in, fellow. It means the world when people see the content I am sharing with you all.

This is more like how to make Erlang and Elixir compile.

Sorry to disagree but Erlang and Elixir end being installed and fully functional.

In modern environments versions managers…

Was your intention to use contemporary or trendy instead of modern? Compiling from source is a standard way to install Software, can’t see the problem (Or legacy approach) here.

you could scare new developers already at the Erlang step.

If they are Windows newcomers to Elixir, I also have a video on the installation process, congratulations to the team making this possible by the way, nothing more easy than clicking the mouse. If they are Linux(The Debian family) newcomers, well… I mean, it’s all on the video. I may have the chance to answer a couple of questions about installing Erlang and Elixir they happen to choose. I like :heart: and promote Elixir (We need an Elixir emoji) (Thanks Jose Valim and Team!).

The biggest problem with your guide however is how to do update your installed by hand environment

I’d like to minimize assumptions, perhaps my fellows are specialists at automating these sorta processes. For me, this represents an opportunity for them.

Happy weekend!

and…

Happy Hacking!

P.S.

What a guide like you could do…

Got my plate full, I have even an Elixir/Phoenix video on the way arriving soon! (For newcomers and advanced users as well!).


Caleb

Did you said that to Gentoo user? :joy:

It is “legacy”. We work on tools to automate our work not for fun, but to make them work what they are supposed to. :smiley:

Still Gentoo is much different level comparing to LFS which is intended to create your own distribution. Most people never consider it in production no matter how good or stable the software could be. As said asdf for example allows to compile both Erlang and Elixir + it gives you ability to easily install and switch between multiple versions. Nobody cares how and why you did something. When you join a project your team expect from you to have tool x with version y asap and the optimization points are already available in version managers. :see_no_evil:

:+1: for Elixir emoji

That’s not the point. You show the longest and the most unhandy solution. All I said about is that everything you described in 10 minutes needs to be maintained by hand. For every update, version change to match specific project requirements and so on you spend way too much time. As said even if some Linux distribution does not gives you a Windows-like installer you can prepare automatic solutions in half the time and have updates almost “for free” as the dependencies are fetched together with system updates and all you have to do is to use a version manager. :chart_with_upwards_trend:

Yeah and you share it on forum which is used by much bigger group than your fellows. :joy:

It’s not even a comment specific to this case. Every time I write on forum I try to gives a more generic answers. Even if I prefer asdf I say more often version manager and give asdf as an example instead. :thinking:

In my proposition users could install dependencies without creating packages. Instead of calling apt-get install meta-package they could call same command with all the dependencies instead. However it’s a true pain to maintain. Now let’s say you have dozens or even hundreds of packages installed. Do you remember why you have installed each package and what it does? In my case it’s obvious as everything is described without much less work. The same way you can install LFS without any dependency management. You can compile everything from source like in Gentoo. The question is what you win there in production? In Gentoo example all compile optimizations apply. There is no need to work with LFS unless as said you want a completely new distribution. :heavy_plus_sign:

Or maybe in other words … as same as we have version managers we have other tools like ./configure scripts and make. Can we build software without them? Maybe (I didn’t check), but what it gives for us? Unfortunately it’s only a waste of time and learning how compilation from source works. When you install software you expect it working as you install it for some purpose. Gentoo with its ebuilds give you much more control than you ever use. :rocket:

Your way is not bad especially if you want to learn how everything works under the hood. It’ s just as manual as a new LFS-based distribution without a package manager. Sure, it works, you have a full control and all good points ends here. :sweat_smile:

I’m using such environment:

bazel           6.1.2           $HOME/.tool-versions
elixir          ref:v1.16.1     $HOME/.tool-versions
erlang          26.2.2          $HOME/.tool-versions
java            temurin-21.0.2+13.0.LTS $HOME/.tool-versions
nodejs          21.6.1          $HOME/.tool-versions
php             8.3.2           $HOME/.tool-versions
postgres        16.1            $HOME/.tool-versions
ruby            3.3.0           $HOME/.tool-versions
rust            1.75.0          $HOME/.tool-versions
sqlite          3.45.0          $HOME/.tool-versions

I can’t imagine that I’m up-to-date with all those tools and all their dependencies unless I’m using a version manager. :tired_face:

Of course I’m also compiling some packages the manual way. Mostly for testing only. If I’m going to use them often I would expect to have updates, especially potential security updates as soon as possible without trying to remind or watch again video of how to do that manually. :icon_confused:

Eiji!

Well, I would like to draw this self-enriching conversation to a conclusion, let me first thank you for the time and thought you have put into your detailed and elaborated answers.

Let me also mention the fact I am an Elixir/Phoenix newcomer myself, a couple of months ago I’ve shared a kind of walkthrough in which I have installed (Not shown in the video) Erlang and Elixir using the official repositories available in Ubuntu. I also used the automated deployment process Gigalixir provides, believe me, there was nothing manual in there.

I would take into consideration your points for my future videos, but I certainly believe installing from sources is a good and standard alternative.

Did you said that to Gentoo user? :joy:

How could I knew this? I didn’t meant to offend you. I didn’t dig into your profile, so if you are sorta an advaced user please accept my apologies. The video is all about installing on Debian (It is in the title).

Thank you very much again for your insights, appreciated, and please do have an excellent week ahead.

1 Like

3rd and last time: version managers also do that. :wink:

Offend when I use :joy: or :smiley: emoticons? :joy: :rofl: :joy:

No and I don’t want them, chill. :slight_smile:

My point is that for 2 reasons many people would prefer other guides:

  1. The first group of people are just lazy or want to “give it a try” asap
  2. The second group of people are also lazy, they are aware of it and because of that they look for an automation

Also automation does not requires installation of binaries

And thanks for your video. If the only suggestion here is about automation of what you do, then it means that what you do is good. :+1:

Will do and most probably even in different way than you think. I’m about to finish new project soon (just need more tests). Hopefully it’s generic enough for everyone and would well cover a desired use cases. :bulb:

After this I’m thinking about posting some automation guides for Debian/Ubuntu, Gentoo and maybe also for other distributions. :thinking: