1.官網下載最新版
https://www.erlang-solutions.com/
2.執行安裝命令
# dpkg -i esl-erlang_22.0.7-1~ubuntu~xenial_amd64.deb
Selecting previously unselected package esl-erlang.
dpkg: considering removing erlang-asn1 in favour of esl-erlang ...
dpkg: erlang-asn1 is not properly installed; ignoring any dependencies on it
dpkg: yes, will remove erlang-asn1 in favour of esl-erlang
(Reading database ... 79801 files and directories currently installed.)
Preparing to unpack esl-erlang_22.0.7-1~ubuntu~xenial_amd64.deb ...
Unpacking esl-erlang (1:22.0.7-1) ...
dpkg: dependency problems prevent configuration of esl-erlang:
esl-erlang depends on libwxbase2.8-0 | libwxbase3.0-0 | libwxbase3.0-0v5; howev er:
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
3.安裝缺少包
# 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
rabbitmq-server : Depends: socat but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a s olution).
4.繼續執行
# apt-get -f install
The following packages will be upgraded:
libdrm2
1 upgraded, 118 newly installed, 0 to remove and 286 not upgraded.
2 not fully installed or removed.
Need to get 44.9 MB of archives.
After this operation, 318 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
5.重新執行命令
# dpkg -i esl-erlang_22.0.7-1~ubuntu~xenial_amd64.deb
(Reading database ... 98697 files and directories currently installed.)
Preparing to unpack esl-erlang_22.0.7-1~ubuntu~xenial_amd64.deb ...
Unpacking esl-erlang (1:22.0.7-1) over (1:22.0.7-1) ...
Setting up esl-erlang (1:22.0.7-1) ...
6.檢查是否安裝成功
# erl
Erlang/OTP 22 [erts-10.4.4] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]
Eshell V10.4.4 (abort with ^G)
1>