How do I install erlang OTP 25 on ubuntu? - erlang

I am trying to install erlang 25 (and elixir 1.13) on my ubuntu VM, but the default version installed by apt is erlang 24.
I've tried both :
sudo wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.d
sudo apt update
and
sudo wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.d
sudo apt update
but in both case, running apt-cache policy esl-erlang didn't show the desired version. I have recently installed erlang 25 on a identical vm, and I don't remember struggling at all, so I'm guessing there's a simple way of doing it that I just forgot ?
I hope you can help me, thank you !

From the Erlang OTP repo, you should do:
apt-get install erlang
If you decide to compile from source:
git clone https://github.com/erlang/otp.git
cd otp
git checkout maint-25 # current latest stable version
./configure
make
make install
Alternatively, you can use Kerl:
curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod a+x kerl
and place kerl in your PATH so that you can invoke it from the terminal (remember to source your .bashrc or similar if you update your PATH variable there, or open a new terminal to reload the PATH env), i.e.,
export PATH=<path-to-kerl>:$PATH
Instructions on how to use it here.

I would recommend the usage of the Erlang Version Manager, thanks to which you can compile and install any Erlang OTP version you need, regardless of what the default version is currently available for your Linux distro.
Installation of Erlang Version Manager:
$ git clone https://github.com/robisonsantos/evm /tmp/evm/
$ cd /tmp/evm/
$ /tmp/evm/install
$ echo 'source ~/.evm/scripts/evm' >> ~/.bashrc
$ bash
Installation of the specific Erlang OTP version:
$ evm install 25.1.1 -y
$ evm default 25.1.1

Related

Install valgrind on ubi8-minimal docker image

I want to install valgrind on a docker container based on ubi-8 minimal image. The problem is the tool doesn't seem to be available in any packages on the microdnf repository. I tried with gcc-toolset-11-valgrind, gcc-toolset-11-gcc-11, gcc-toolset-11-gcc-c++, gcc-toolset-11-runtime, etc to see if the tool is available in any package. There should be a package available for normal rpm: gcc-toolset-11-perftools, but it isn't available.
I also tried to download valgrind by hand and execute from a volume but the dependencies are not available. Is there a easier way to get running valgrind on a ubi8-minimal docker container?
Using rpm in combination with already download packages I finally managed to install valgrind, the process was:
download valgrind package and dependencies with yum in the host machine
yum install --downloadonly --downloaddir=./valgrindDownload gcc-toolset-11-valgrind
Find out missing dependencies (gcc-toolset-11-runtime-11, and perl)
Install local packages using rpm:
rpm --install ./valgrindDownload/gcc-toolset-11-valgrind-3.17.0-6.el8.x86_64.rpm
Find out valgrind instalation directory
In my case was under /opt/rh/gcc-toolset-11/root/usr/bin/valgrind
Finally run the full command:
sudo docker run -v `pwd`:/home/<container-dir> <docker-image>:<version> /bin/bash -c "microdnf install gcc-toolset-11-runtime-11.1-1.el8.x86_64 && microdnf install perl-5.26.3-421.el8.x86_64 && rpm --install ./valgrindDownload/gcc-toolset-11-valgrind-3.17.0-6.el8.x86_64.rpm && /opt/rh/gcc-toolset-11/root/usr/bin/valgrind --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt command <arguments>"
Doing so, the valgrind output gets redirected to valgrind-out.txt

Can't find any man pages in Fedora Docker Image

After installing the man pages via dnf, I still can't find them inside /usr/share/man.
docker run --rm -it fedora bash -c "dnf install -y man-pages && ls -lR /usr/share/man"
Did I miss something?
The default configuration for the docker version of fedora disable the installation of documentation.
cat /etc/dnf/dnf.conf
Check out the last line :
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=False
skip_if_unavailable=True
tsflags=nodocs
However, it is still possible to change the last line or override it like below command :
dnf install -y man-pages --setopt='tsflags='
I would liked to contribute as I was looking for the answer and I found the answer, from the link here
Confirm the below line is removed from /etc/dnf/dnf.conf
tsflags=nodocs
and remove and reinstall the man pages using dnf
dnf install man man-pages man-db

docker Error with pre-create check: "We support Virtualbox starting with version 5

I'm trying to create docker machine host using the following command in fedora OS version 25.
docker-machine create -driver=virtualbox host01
I get below error while executing the command.
Error with pre-create check: "We support Virtualbox starting with version 5. Your VirtualBox install is \"WARNING:
The vboxdrv kernel module is not loaded.
Either there is no module available for the current kernel (4.10.12-200.fc25.x86_64) or it failed to load.
Please try load the kernel module by executing as root
dnf install akmod-VirtualBox kernel-devel-4.10.12-200.fc25.x86_64 akmods --kernels 4.10.12-200.fc25.x86_64 && systemctl restart systemd-modules-load.service
You will not be able to start VMs until this problem is fixed.\\n5.1.26r117224\".
Please upgrade at https://www.virtualbox.org"
I have already virtualbox latest version installed. Running the command suggested by
sudo dnf install akmod-VirtualBox kernel-devel-4.10.12-200.fc25.x86_64 akmods --kernels 4.10.12-200.fc25.x86_64 && systemctl restart systemd-modules-load.service
I got the below error
Last metadata expiration check: 0:48:35 ago on Thu Aug 17 22:38:47 2017.
Package akmods-0.5.6-7.fc25.noarch is already installed, skipping.
No package --kernels available.
No package 4.10.12-200.fc25.x86_64 available.
Any suggestions?
I also had this problem and for this I upgrade Virtual box to 5.2 using following commands. This link help me
sudo apt-get remove virtualbox virtualbox-5.1
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" >> /etc/apt/sources.list.d/virtualbox.list'
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-5.2
Hope this helps.
For windows users, in 2022 such problem still exists. So for those who use last build (now it is virtualBox-6.1.32-149290-Win), try to use version that starts with prefix 5. But not all '5' versions work. For example, for me worked only version 5.2.42 while versions: 5.2.18, 5.2.20, 5.2.44 didn't work
Helped for win 11 x64

Installing rabbitmq-server on RHEL

When trying to install rabbitmq-server on RHEL:
[ec2-user#ip-172-31-34-1XX ~]$ sudo rpm -i rabbitmq-server-3.3.5-1.noarch.rpm
error: Failed dependencies:
erlang >= R13B-03 is needed by rabbitmq-server-3.3.5-1.noarch
[ec2-user#ip-172-31-34-1XX ~]$ rpm -i rabbitmq-server-3.3.5-1.noarch.rpm
error: Failed dependencies:
erlang >= R13B-03 is needed by rabbitmq-server-3.3.5-1.noarch
I'm unsure why trying to rpm install isn't recognizing my erlang install since running $ erlgives:
[ec2-user#ip-172-31-34-1XX ~]$ which erl
/usr/local/bin/erl
[ec2-user#ip-172-31-34-1XX ~]$ sudo which erl
/bin/erl
You will need to ensure that an up-to-date version of Erlang is installed. It is available in the EPEL repository.
You can install it by performing the following:
wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo
yum install erlang
Following the above setup of Erlang, you can then proceed to install RabbitMQ as follows:
rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
yum install rabbitmq-server-3.3.5-1.noarch.rpm
You can find more info in their setup guide
You need to install erlang via RPM for it to recognise the dependency.
The erlang RPMs are available in the EPEL repository:
https://www.rabbitmq.com/install-rpm.html

How to install brew on Unix 13.10

I need to install fleetctl and I found a tutorial that says to use
brew install fleetctl
The thing is, I don't have brew installed, and when I follow this tutorial here and type
which brew
afterwards, nothing happens. So, how do I get brew working? I'm using Ubuntu 13.10
Brew, or Homebrew, is a package manager for OS X. Therefore, it will not work on Ubuntu, which is a Debian flavored Linux.
Package managers means that someone has precompiled source code. It doesn't look like Ubuntu's package manager, apt-get, has a precompiled version.
However, the creators of fleetctl have a compiled version here:
https://github.com/coreos/fleet > Releases > fleet-v0.8.3-linux-amd64.tar.gz
So on your box:
Download it:
$ wget https://github.com/coreos/fleet/releases/download/v0.8.3/fleet-v0.8.3-linux-amd64.tar.gz
Untar it:
$ tar -xvf fleet-v0.8.3-linux-amd64.tar.gz
It's not installed yet, as you can see from which but it'll run:
$ which fleetctl
/usr/bin/which: no fleetctl in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/ec2-user/bin)
$ ./fleet-v0.8.3-linux-amd64/fleetctl
(Optional but recommended) Install it by moving to /usr/local/bin
$ sudo cp fleet-v0.8.3-linux-amd64/fleetctl /usr/local/bin
You can prove that it's installed and run it from any directory:
$ which fleetctl
/usr/local/bin/fleetctl
$ fleetctl

Resources