Install Erlang on Ubuntu16.04 (the first step of rabbitmq installation)

Why install Erlang
There are some applications and systems, among which Erlang plays an important role: RabbitMQ, the message-oriented middleware is written in Erlang programming language. WhatsApp uses Erlang to run its messaging server. Many big companies such as Amazon, Yahoo, Facebook, Motorola, and Github are using Erlang.

1. A brief introduction about Erlang
Let me verify it. Alas, the blogs nowadays are too unreliable, and there is no verification test, just write it out. Misleading everyone, wasting everyone's time and energy.

2. Download the package
First, go to the Erlang official website to download the latest installation package. 
It is not recommended to use apt-get to find that the source cannot be found, or that it has not been updated for a long time, and the installation is old. 
Official package download address: https://www.erlang-solutions.com/resources/download.htm


3. Perform installation operations
1. Perform installation operations (make sure ubantu version 16.04 is Xenial)

dpkg -i esl-erlang_21.0-1_ubuntu_ Xenial_amd64.deb



     It will say that I am missing a lot of related dependencies.

root@ubuntu:/home/erlang# dpkg -i esl-erlang_21.0-1_ubuntu_Xenial_amd64.deb 
Selecting previously unselected package esl-erlang.
(Reading database ... 60202 files and directories currently installed.)
Preparing to unpack esl-erlang_21.0-1_ubuntu_artful_amd64.deb ...
Unpacking esl-erlang (1:21.0) ...
dpkg: dependency problems prevent configuration of esl-erlang:
 esl-erlang depends on libwxbase2.8-0 | libwxbase3.0-0 | libwxbase3.0-0v5; however:
  Package libwxbase2.8-0 is not installed.
  Package libwxbase3.0-0 is not installed.
  Package libwxbase3.0-0v5 is not installed.
 esl-erlang depends on libwxgtk2.8-0 | libwxgtk3.0-0 | libwxgtk3.0-0v5; however:
  Package libwxgtk2.8-0 is not installed.
  Package libwxgtk3.0-0 is not installed.
  Package libwxgtk3.0-0v5 is not installed.
 esl-erlang depends on libsctp1; however:
  Package libsctp1 is not installed.

dpkg: error processing package esl-erlang (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 esl-erlang


2. Solve the dependency problem Solve the dependency
as required: 
for example:

root@ubuntu:/home/erlang# apt-get install libwxbase3.0-0v5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 esl-erlang : Depends: libwxgtk2.8-0 but it is not installable or
                       libwxgtk3.0-0 but it is not installable or
                       libwxgtk3.0-0v5 but it is not going to be installed
              Depends: libsctp1 but it is not going to be installed
              Recommends: erlang-mode but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


At this time you need to execute:

apt-get -f install


Then you will be asked to agree to enter a y. 
It takes about five minutes to execute.

3. Perform the installation operation again

root@ubuntu:/home/erlang# dpkg -i esl-erlang_21.0-1_ubuntu_artful_amd64.deb 
(Reading database ... 79229 files and directories currently installed.)
Preparing to unpack esl-erlang_21.0-1_ubuntu_artful_amd64.deb ...
Unpacking esl-erlang (1:21.0) over (1:21.0) ...
Setting up esl-erlang (1:21.0) ...
root@ubuntu:/home/erlang# 


4. Check whether the installation is successful
. The installation is successful.

root@ubuntu:/home/erlang# erl
Erlang/OTP 21 [erts-10.0] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]

Eshell V10.0  (abort with ^G)
1> 


--------------------- 
Original: https://blog.csdn.net/wd2014610/article/details/81945922 
 

Guess you like

Origin blog.csdn.net/qq_42293496/article/details/86659110