Since the final deployment of the production environment is centos, I need to install Erlang b13r04 in centos. The first time I did this, I had to take a long time off, but I was not familiar with the libraries that Erlang relied on; here we will sort out the installation details:
Which libraries does Erlang depend on?
- A fully workingGccCompiler environment
- NcursesDevelopment Libraries
- OpenSSLDevelopment libraries (required if MySQL is used)
After these libraries are installed, you must re-execute the configure command. After configure, you will be prompted which dependent libraries are not installed. You can discard some libraries as needed; the preceding operations can be implemented using the following command:
> Sudo Yum-y install make GCC gcc-C ++ kernel-devel M4 ncurses-devel OpenSSL-devel
> Wget http://www.erlang.org/download/otp_src_R13B04.tar.gz
> Tar xfvz otp_src_r13b04.tar.gz
> Cd otp_src_r13b04/
>./Configure -- With-SSL
> Sudo make install
Note: If you encounter the following error:
{Error,
{Load_failed,
"Failed to load NIF Library: '/usr/local/lib/Erlang/lib/crypto-2.0/priv/lib/crypto. So: Undefined Symbol: enif_make_new_binary '"}}
There are two possible reasons:
- OpenSSL Not Installed
- If you have installed multiple versions of Erlang, r14a, and r13b04, delete the Erlang-related folders and reinstall them.
The crypto class library may be suffering from you multiple times. If the following error occurs in Windows:
Application: crypto
Exited: {shutdown, {crypto_app, start, [Normal, []}
Basically, because OpenSSL is not installed, you can download a win32openssl package and install it. During the installation process, follow the default next method.
Note that in the centos environment, we recommend that you do not install the server in the root directory. Otherwise, you will encounter errors during make.