Difference between revisions of "Installing Erlang by source"

From Notes_Wiki
m
m
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Installing Erlang by source=
[[Main_Page|Home]] > [[Erlang]] > [[Erlang installation]] > [[Installing Erlang by source]]


We can install Erlang on CentOS using '<tt>yum install erlang</tt>' when all popular repositories are configured. However if we want latest version of Erlang then we need to install from source. To install erlang from source we can use following steps:
=Install erlang by source=
#Use '<tt>yum -y install wxGTK wxGTK-devel gcc ncurses-devel openssl-libs openssl-devel java java-1.8.0-openjdk-devel fop gcc-c++ byacc bison unixODBC unixODBC-devel</tt>'
# Download the source and latest man packages from Erlang sites
#Download Erlang source code and man pages.
#:* https://www.erlang.org/downloads
#Extract source (tar xzf otp_src_*.tar.gz)
#:* https://erlang.org/download/
#Run '<tt>./configure; make; sudo make install</tt>'
# Install required dependencies:
#Optionally remove extracted source directory
#:<pre>
#<tt>mkdir man</tt>
#:: dnf -y install gcc ncurses-devel openssl-libs openssl-devel java java-1.8.0-openjdk-devel gcc-c++ byacc bison unixODBC unixODBC-devel
#<tt>tar xzf otp_doc_man_*.tar.gz -C man</tt>
#:</pre>
#<tt>sudo mv man/man /usr/local/lib/erlang</tt>
# Extract the sources and install via:\
#<tt>rm man -rf</tt>
#:<pre>
#Test whether man pages and erlang both are working with '<tt>erl -man erl</tt> command.
#:: ./configure; make; make install
#:</pre>
#: Ignore warning related to wxwidgets and fop
# Test by opening
#:<pre>
#:: erl
#:: q().
#:</pre>
 
 
=Install man pages=
# Install man pages using:
#:<pre>
#:: mkdir man
#:: tar xzf otp_doc_man_*.tar.gz -C man
#:: sudo mv man/man /usr/local/lib/erlang
#:: rmdir man
#:</pre>
# Test by opening
#:<pre>
#:: erl -man erlang
#:: erl -man lists
#:</pre>
 
=Install yaws web server=
# Download zip source file from https://github.com/erlyaws/yaws
# Install pam-devel files using:
#:<pre>
#:: dnf -y install pam-devel
#:</pre>
# Extract the zip file and build configure via
#:<pre>
#:: autoreconf -fi
#:</pre>
#: Step mentioned in README.md
# Configure, compile and install via:
#:<pre>
#:: ./configure; make; make install
#:</pre>
#: Fails with yaws-2.1.1 with erlang/OTP 26 as time of this writing on 30th July 2023 with: <source type="shell">
compile: warnings being treated as errors
yaws_config.erl:3563:20: file:pid2name/1 is deprecated and will be removed in OTP 27; this functionality is no longer supported
% 3563|    {ok, Config} = file:pid2name(FD),
%    |                    ^
 
yaws_config.erl:3579:20: file:pid2name/1 is deprecated and will be removed in OTP 27; this functionality is no longer supported
% 3579|    {ok, Config} = file:pid2name(FD),
%    |                    ^
 
make[1]: *** [Makefile:661: ../ebin/yaws_config.beam] Error 1
</source>
 
 
 
[[Main_Page|Home]] > [[Erlang]] > [[Erlang installation]] > [[Installing Erlang by source]]

Latest revision as of 09:17, 9 April 2024

Home > Erlang > Erlang installation > Installing Erlang by source

Install erlang by source

  1. Download the source and latest man packages from Erlang sites
  2. Install required dependencies:
    dnf -y install gcc ncurses-devel openssl-libs openssl-devel java java-1.8.0-openjdk-devel gcc-c++ byacc bison unixODBC unixODBC-devel
  3. Extract the sources and install via:\
    ./configure; make; make install
    Ignore warning related to wxwidgets and fop
  4. Test by opening
    erl
    q().


Install man pages

  1. Install man pages using:
    mkdir man
    tar xzf otp_doc_man_*.tar.gz -C man
    sudo mv man/man /usr/local/lib/erlang
    rmdir man
  2. Test by opening
    erl -man erlang
    erl -man lists

Install yaws web server

  1. Download zip source file from https://github.com/erlyaws/yaws
  2. Install pam-devel files using:
    dnf -y install pam-devel
  3. Extract the zip file and build configure via
    autoreconf -fi
    Step mentioned in README.md
  4. Configure, compile and install via:
    ./configure; make; make install
    Fails with yaws-2.1.1 with erlang/OTP 26 as time of this writing on 30th July 2023 with:
    compile: warnings being treated as errors
    yaws_config.erl:3563:20: file:pid2name/1 is deprecated and will be removed in OTP 27; this functionality is no longer supported
    % 3563|     {ok, Config} = file:pid2name(FD),
    %     |                    ^
    
    yaws_config.erl:3579:20: file:pid2name/1 is deprecated and will be removed in OTP 27; this functionality is no longer supported
    % 3579|     {ok, Config} = file:pid2name(FD),
    %     |                    ^
    
    make[1]: *** [Makefile:661: ../ebin/yaws_config.beam] Error 1


Home > Erlang > Erlang installation > Installing Erlang by source