Ubuntu 12.04 LTS 64-bit compiler installs Erlang R16b02__erlang

Source: Internet
Author: User

1. Download Erlang r16b02 Source Pack

Http://www.erlang.org/download/otp_src_R16B02.tar.gz

2. Because Java is needed in the process of compiling Erlang, the JDK is installed and the corresponding environment variables are configured, using the Jdk-6u45-linux-x64.bin

wget--no-cookies--header "cookie:gpw_e24=http%3a%2f%2fwww.oracle.com%2f" Http://download.oracle.com/otn-pub/java /jdk/6u45-b06/jdk-6u45-linux-x64.bin

chmod u+x Jdk-6u45-linux-x64.bin

./jdk-6u45-linux-x64.bin

Export java_home=/usr/local/jdk1.6.0_45
Export path= $PATH: $JAVA _home/bin:
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

3. Install Erlang Dependency Pack

Apt-get Install g++ build-essential libncurses5-dev Libgl1-mesa-dev

4. After unpack, execute the following command, where the--enable-smp-support option is used to turn on multiprocessor support,--enable-kernel-poll option to open Epoll support

./configure--prefix=/usr/local/erlang--enable-smp-support--enable-threads--enable-kernel-poll--enable-hipe

The end of the configuration will have the following results

*********************************************************************
Applications DISABLED **********************
*********************************************************************
Crypto:no usable OpenSSL found
ODBC:ODBC Library-link check failed
Ssh:no usable OpenSSL found
Ssl:no usable OpenSSL found

*********************************************************************
*********************************************************************
Applications Information *******************
*********************************************************************
Wx:wxwidgets not found, WX won't be usable

which

Crypto:no usable OpenSSL found
Ssh:no usable OpenSSL found
Ssl:no usable OpenSSL found

Can be passed: Apt-get Install Libssl-dev Solution

ODBC:ODBC Library-link check failed

Can be passed: Apt-get Install UNIXODBC Unixodbc-dev Solution

Wx:wxwidgets not found, WX won't be usable

This must be done by installing the Wxwidgets Library

5. Download the wxwidgets source package

https://sourceforge.net/projects/wxwindows/files/2.8.12/

6. Configure compilation Wxwidgets

Tar jxf wxwidgets-2.8.12.tar.bz2

./configure--enable-unicode--with-opengl

In the configuration process if the report cannot find the GTK library error, you can pass: Apt-get Install Libgtk2.0-dev resolution

If it appears: Configure:error:OpenGL libraries not available, the following method is used to resolve

Ln-s/usr/lib/x86_64-linux-gnu/libgl.so/usr/lib/libgl.so

Ln-s/usr/lib/x86_64-linux-gnu/libglu.so/usr/lib/libglu.so

Make && make install

Because Erlang needs to use the Wxwidget STC, it needs

CD WXWIDGETS-2.8.12/CONTRIB/SRC/STC

Make && make install

Finally configure the Wxwidgets library path

Echo/usr/local/lib >/etc/ld.so.conf.d/wx.conf

Ldconfig

7. Finally reconfigure the Rebuild Erlang

./configure--prefix=/usr/local/erlang--enable-smp-support--enable-threads--enable-kernel-poll--enable-hipe

Make && make install

Note:

The execution Tv:start () may occur after Erlang has been installed. Output only one PID, and then no window pops out of the case. This is because the Tk-dev package is not installed.

The answer is:

Apt-get Install Tk-dev

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.