processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.03k stars 1.5k forks source link

Error in installing ejabberd #4040

Closed heelll-boooy closed 1 year ago

heelll-boooy commented 1 year ago

Hello

when i installing ejabberd i have the proplem in command make :

root@123:~/ejabberd-15.06# make
rm -rf deps/.got
rm -rf deps/.built
/usr/local/lib/erlang/bin/escript rebar get-deps && :> deps/.got
==> p1_utils (get-deps)
==> p1_cache_tab (get-deps)
==> p1_tls (get-deps)
==> p1_stringprep (get-deps)
==> p1_xml (get-deps)
==> p1_stun (get-deps)
==> esip (get-deps)
==> p1_yaml (get-deps)
==> ehyperloglog (get-deps)
==> p1_zlib (get-deps)
==> lager (get-deps)
Pulling goldrush from {git,"git://github.com/DeadZen/goldrush.git",
                           {tag,"0.1.6"}}
Cloning into 'goldrush'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Connection timed out

ERROR: git clone -n git://github.com/DeadZen/goldrush.git goldrush failed with error: 128 and output:
Cloning into 'goldrush'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.4]: errno=Connection timed out
ERROR: 'get-deps' failed while processing /root/ejabberd-15.06/deps/lager: rebar_abort
Makefile:82: recipe for target 'deps/.got' failed
make: *** [deps/.got] Error 1

Me server cant connect to github.com Some Body Help me? Thanks

licaon-kter commented 1 year ago

Latest version is 23.04, can you upgrade to a newer than 8 years version maybe?

heelll-boooy commented 1 year ago

hello thank for you i try version 18.1 also same the proplem i think an error to connect the server thanks

heelll-boooy commented 1 year ago

Can I upgrade to the latest version and my server specifications are Ram 1 Gb Erlang version: `` 17.5 OS: Linux Ubuntu 16.4

I am experimenting with it now to get the best version and the best performance

Thanks

heelll-boooy commented 1 year ago

Hello @licaon-kter Man Can u Help me? please Thanks

badlop commented 1 year ago

Can I upgrade to the latest version and my server specifications are Ram 1 Gb

That small RAM probably is not a problem for ejabberd, I imagine it should work correctly.

Erlang version: `` 17.5

Erlang 17.5 is supported by ejabberd 18.12, that is the newest ejabberd version supported by that erlang. You can try compiling ejabberd 18.12 with erlang 17.5.

If compiling does not work, show here the log message.

heelll-boooy commented 1 year ago

Hello Thanks badlop i well try now and update you

heelll-boooy commented 1 year ago

Hello I try it and Write This :

root@hell.boy:~# cd /root/ejabberd-18.12
root@hell.boy:~/ejabberd-18.12# ./configure --enable-odbc
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for a sed that does not truncate output... /bin/sed
checking for erl... /usr/local/bin/erl
checking for erlc... /usr/local/bin/erlc
checking for epmd... /usr/local/bin/epmd
checking for erl... /usr/local/bin/erl
checking for erlc... /usr/local/bin/erlc
checking Erlang/OTP version... Compiler function compile:compile/3 failed:
{undef,[{code,ensure_modules_loaded,
              [[beam_a,beam_asm,beam_block,beam_bool,beam_bs,beam_bsm,
                beam_clean,beam_dead,beam_dict,beam_except,beam_flatten,
                beam_jump,beam_opcodes,beam_peep,beam_receive,beam_reorder,
                beam_split,beam_trim,beam_type,beam_utils,beam_validator,
                beam_z,cerl,cerl_clauses,cerl_sets,cerl_trees,core_lib,epp,
                erl_bifs,erl_expand_records,erl_lint,erl_parse,erl_scan,
                sys_core_dsetel,sys_core_fold,sys_pre_expand,v3_codegen,
                v3_core,v3_kernel,v3_life]],
              []},
        {compile,compile,3,[{file,"compile.erl"},{line,1835}]},
        {erl_compile,compile_file,4,[{file,"erl_compile.erl"},{line,302}]},
        {erl_compile,compile3,3,[{file,"erl_compile.erl"},{line,283}]},
        {erl_compile,'-compiler_runner/1-fun-0-',1,
                     [{file,"erl_compile.erl"},{line,90}]}]}
configure: error: "Could not compile Erlang/OTP version check program using '/usr/local/bin/erlc'"
badlop commented 1 year ago

Oh, sorry, it seems I didn't read correctly the code: it seems ejabberd 18.12 requires erlang 19.0

Now looking again, ejabberd 18.09 requires Erlang 17.5, so maybe with some luck you can compile that one.

If that doesn't work, an alternative would be that you download and compile a recent Erlang version. It will take one or two hours, but that way you will be able to use a recent ejabberd.

Another alternative would be to use the container images from https://hub.docker.com/r/ejabberd/ecs/tags

heelll-boooy commented 1 year ago

Hello Thanks If I re-install My Server to Ubuntu-20.04-x86_64 and download a latest of the Otp and Ejabberd, can it work with the server specifications? without any future problems? waiting for your replay Thanks

badlop commented 1 year ago

I see that Ubuntu 20.04LTS (Focal) includes Erlang 22.2. The most recent ejabberd 23.04 requires Erlang 20.0 or higher...

So yes, the Erlang included in Ubuntu 20.04 will be supported by ejabberd and newer versions for quite some time.

heelll-boooy commented 1 year ago

i well try it and update you

heelll-boooy commented 1 year ago

since 1 hour i re install srever to ubuntu 16.4 and install Otp 17.5 when i install ejabberd.18.12 in command "make"

Pulling goldrush from {git,"https://github.com/DeadZen/goldrush.git",
                           {tag,"0.1.9"}}
Cloning into 'goldrush'...
==> goldrush (get-deps)
==> p1_utils (get-deps)
==> cache_tab (get-deps)
==> fast_tls (get-deps)
==> stringprep (get-deps)
==> fast_xml (get-deps)
==> ezlib (get-deps)
==> xmpp (get-deps)
==> fast_yaml (get-deps)
==> jiffy (get-deps)
WARN:  Missing plugins: [rebar3_hex]
==> p1_oauth2 (get-deps)
==> pkix (get-deps)
==> jose (get-deps)
Pulling base64url from {git,"git://github.com/dvv/base64url.git",
                            {branch,"master"}}
Cloning into 'base64url'... 
badlop commented 1 year ago

Ok, try this:

rm -rf deps/
make

It will have a problem cloning base64url as before. Then edit the file deps/jose/rebar.config and change the line

       {base64url, ".*", {git, "git://github.com/dvv/base64url.git", {branch, "master"}}}

with this line:

       {base64url, ".*", {git, "https://github.com/dvv/base64url", {branch, "master"}}}

then try again make, and let's hope it can download base64url and compile.

heelll-boooy commented 1 year ago

Yes he can download base64url now Write:

checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for ANSI C header files... (cached) yes checking for erl... /usr/local/lib/erlang/erts-6.4/bin/erl checking for erlc... /usr/local/lib/erlang/erts-6.4/bin/erlc checking yaml.h usability... no checking yaml.h presence... no checking for yaml.h... no configure: error: libyaml header file yaml.h was not found ERROR: Command ['configure-deps'] failed! Makefile:108: recipe for target 'deps/.built' failed make: *** [deps/.built] Error 1

?

badlop commented 1 year ago
apt-get install libexpat1-dev libgd-dev libpam0g-dev libsqlite3-dev libwebp-dev libyaml-dev

This is my last contribution in this thread, because compiling ejabberd with ubuntu 20.04 and erlang 20.0 works correctly, as demonstrated in https://github.com/processone/ejabberd/actions/runs/5067449138/jobs/9098518945

heelll-boooy commented 1 year ago

Thanks he is working but now write : ==> p1_oauth2 (compile) Compiled src/oauth2_token_generation.erl Compiled src/oauth2_priv_set.erl Compiled src/oauth2_config.erl Compiled src/oauth2.erl Compiled src/oauth2_response.erl Compiled src/oauth2_backend.erl Compiled src/oauth2_token.erl ==> pkix (compile) Compiled src/pkix_sup.erl Compiled src/pkix_app.erl /root/ejabberd-18.12/deps/pkix/src/pkix.erl:355: illegal use of variable 'Cert' in map /root/ejabberd-18.12/deps/pkix/src/pkix.erl:365: illegal use of variable 'Key' in map /root/ejabberd-18.12/deps/pkix/src/pkix.erl:680: illegal use of variable 'Domain' in map /root/ejabberd-18.12/deps/pkix/src/pkix.erl:681: illegal use of variable 'Domain' in map /root/ejabberd-18.12/deps/pkix/src/pkix.erl:682: illegal use of variable 'Domain' in map Compiling /root/ejabberd-18.12/deps/pkix/src/pkix.erl failed: ERROR: compile failed while processing /root/ejabberd-18.12/deps/pkix: rebar_abort Makefile:108: recipe for target 'deps/.built' failed make: *** [deps/.built] Error 1

now i try with ubuntu 16.4

later i well buy another server and try with your contribution

heelll-boooy commented 1 year ago

Hello @badlop Please Can U Help me?? Im Waiting You