<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I am going through this tutorial: <a href="http://erlang.org/doc/tutorial/cnode.html" class="">http://erlang.org/doc/tutorial/cnode.html</a></div><div class=""><br class=""></div><div class="">Compile steps works, but when I try to run the example with below command:</div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">$ ./cserver 3456</span></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class="">I got this:</div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">erl_publish</span></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class=""><br class=""></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class="">$ echo $?</div><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class="">1</div><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class=""><br class=""></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class="">Does anyone encounter this before?</div><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class="">Based on the documentation, seems this issue comes from:</div><div style="margin: 0px; line-height: normal;" class=""><pre style="font-family: mono, Courier, monospace; font-size: 11.2px; margin-top: 0px; margin-bottom: 0px; color: rgb(56, 58, 66); font-variant-ligatures: normal; orphans: 2; widows: 2;" class=""> <span class="hljs-keyword" style="color: rgb(166, 38, 164);">if</span> (erl_publish(port) == -1)
erl_err_quit(<span class="hljs-string" style="color: rgb(80, 161, 79);">"erl_publish"</span>);</pre><div style="font-family: Menlo; font-size: 11px;" class="">But what should I do to fix this?</div><div style="font-family: Menlo; font-size: 11px;" class=""><br class=""></div><div style="font-family: Menlo; font-size: 11px;" class="">I run this on my Mac computer: macOS Sierra 10.12.6</div><div class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">Erlang version: </span></font><span style="font-size: 11px; font-family: Menlo;" class="">Erlang/OTP 22.0.1</span></div></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class=""><br class=""></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class="">With kind regards,</div><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class="">Yao</div><div style="font-family: Menlo; font-size: 11px; margin: 0px; line-height: normal;" class=""><br class=""></div></div></body></html>