ejabberd 'make' 至 "cannot run compiled C program"

ejabberd 'make' through "cannot run compiled C program"

我正在尝试在 CentOS 6.x 上安装 ejabberd,当我使用 运行 "make" 命令时,出现以下错误。

ejabberd]# make
rm -rf deps/.got
rm -rf deps/.built
/usr/lib/erlang/bin/escript rebar get-deps && :> deps/.got
==> goldrush (get-deps)
==> lager (get-deps)
==> 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)
==> jiffy (get-deps)
==> oauth2 (get-deps)
==> xmlrpc (get-deps)
==> p1_zlib (get-deps)
==> p1_iconv (get-deps)
==> rel (get-deps)
==> ejabberd (get-deps)
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/root/ejabberd/deps/p1_tls':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
ERROR: Command ['get-deps'] failed!
make: *** [deps/.got] Error 1

你能帮我解决这个问题吗?我已经安装了 Erlang-17.5 和所有必需的“开发工具”。谢谢。

一个有效的 gcc :# yum install gcc-c++

即安装 C++ 编译器还将安装使 gcc 功能齐全的依赖项:glibc-devel、glibc-headers、kernel-headers。

出现此错误时,请确保安装

 # yum install glibc-headers

这将解决您的错误。