-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patherl_install.txt
155 lines (104 loc) · 4.34 KB
/
erl_install.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
Quick Install of Prerequisite Packages on Ubuntu
Run these commands on the command line to do a quick install:
# for erlang
sudo apt-get install fop
sudo apt-get install libncurses5-dev
sudo apt-get install openjdk-6-jdk
sudo apt-get install unixodbc-dev
sudo apt-get install g++
sudo apt-get install libssl-dev
# for wxwidgets used in erlang
sudo apt-get install libwxbase2.8
sudo apt-get install libwxgtk2.8-dev
sudo apt-get install libqt4-opengl-dev
sudo apt-get install libgtk2.0-dev
### for wxwidgets
sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
sudo apt-add-repository 'deb http://repos.codelite.org/wx3.0.2/ubuntu/ trusty universe'
sudo apt-get update
sudo apt-get install libwxbase3.0-0-unofficial libwxbase3.0-dev libwxgtk3.0-0-unofficial libwxgtk3.0-dev wx3.0-headers wx-common
Download, extract, configure, make, install
cd ~/Downloads
wget http://erlang.org/download/otp_src_18.2.1.tar.gz
wget http://www.erlang.org/download/otp_src_R14B02.tar.gz
tar -zxf otp_src_R14B02.tar.gz
cd otp_src_R14B02
./configure or ./configure --prefix=PATH_TO_ERL_BIN_FILES
make
sudo make install
Should be ready to go now!
What happens at each step if the prerequisite packages are not installed first
If you download, extract and try to configure Erlang without installing the prerequisites first, this is what you will see:
./configure
...
configure: error: No curses library functions found
configure: error: /bin/bash '/usr/local/src/otp_src_R14B02/erts/configure' failed for erts
So now you do this:
sudo apt-get install libncurses5-dev
Now let's try it again:
./configure
....
*********************************************************************
********************** APPLICATIONS DISABLED **********************
*********************************************************************
crypto : No usable OpenSSL found
jinterface : No Java compiler found
odbc : ODBC library - link check failed
orber : No C++ compiler found
ssh : No usable OpenSSL found
ssl : No usable OpenSSL found
*********************************************************************
*********************************************************************
********************** APPLICATIONS INFORMATION *******************
*********************************************************************
wx : wxWidgets not found, wx will NOT be usable
*********************************************************************
*********************************************************************
********************** DOCUMENTATION INFORMATION ******************
*********************************************************************
documentation :
fop is missing.
Using fakefop to generate placeholder PDF files.
*********************************************************************
ok that is better, but lets knock off some of these missing items.
Run the following at the command line:
sudo apt-get install fop
sudo apt-get install openjdk-6-jdk
sudo apt-get install libssl-dev
sudo apt-get install unixodbc-dev
sudo apt-get install g++
./configure
....
*********************************************************************
********************** APPLICATIONS INFORMATION *******************
*********************************************************************
wx : wxWidgets not found, wx will NOT be usable
*********************************************************************
ok - looking better
Now lets run these:
sudo apt-get install libwxbase2.8
sudo apt-get install libwxgtk2.8-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libqt4-opengl-dev
./configure
...
configure: creating ./config.status
...
ah, good nothing missing and no errors
time to run make
make
Ok that passed, now run make install:
sudo make install
Ok, now where is erlang going to run from:
which erl
/usr/local/bin/erl
good, this will override /usr/bin/erl (which the stock install has R13B03 as of Apr 22, 2011).
Now time to do a little test of erlang:
erl
Erlang R14B02 (erts-5.8.3) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false]
Eshell V5.8.3 (abort with ^G)
1> wx:demo().
{wx_ref,35,wxFrame,<0.34.0>}
2>
If you get the wxErlang widgets panel, then things are probably ready to go.
It is left as an exercise to remove the old (stock) Erlang package from Ubuntu :)