今天安装 erlang, 中间出现问题比较多,现在把自己的笔记记下来,分享学习。
#!/sbin/sh
#=================================================================================
# 安装参考了以下文章, 感谢奉献
# http://www.jb51.net/article/59823.htm
# http://jzhihui.iteye.com/blog/1420299
#
#=================================================================================
WX_FILE_TAR="wxWidgets-3.0.2.tar.bz2"
WX_DIR="wxWidgets-3.0.2"
if [ ! -f "$WX_FILE_TAR" ]; then
wget "http://nchc.dl.sourceforge.net/project/wxwindows/3.0.2/$WX_FILE_TAR"
yum install gcc-c++
yum list *gtk+*
yum install gtk+*
yum list mesa*
yum install mesa*
tar -jxvf $WX_DIR
cd $WX_DIR
./configure --with-opengl --enable-debug --enable-unicode
make
make install
fi
SRC_FILE_NAME="otp_src_18.0.tar.gz"
DIR_NAME="otp_src_18.0"
if [ ! -f "$SRC_FILE_NAME" ]; then
echo "$SRC_FILE_NAME not exit, begin download ......"
wget "http://www.erlang.org/download/$SRC_FILE_NAME"
if [ ! -d "$DIR_NAME" ]; then
echo "$DIR_NAME not exit, tar ..."
yum -y install ncurses-devel
yum list | grep ssl
yum install openssl-devel
yum list | grep ODBC
yum install unixODBC-devel
tar -zxvf $SRC_FILE_NAME
fi
fi
cd $DIR_NAME
./configure --prefix=/usr/local/erlang --with-ssl --enable-threads --enable-smp-support --enable-kernel-poll --enable-hipe --without-javac
make
make install
# =================================================================================================================#
# after make install erlang, add global path to thr /etc/peofile
# export PATH=$PATH:/usr/local/erlang/bin
#
//=========================== PS 遇到的比较难搞的问题 ========================================//
在make otp的过程中,出现了
g++: internal compiler error: Killed (program cc1plus) 错误,
刚开始以为是 编译依赖库的问题,一直没搞定
然后看了这个连接http://vb2005xu.iteye.com/blog/2171295,终于搞定了。
由于是我自己买的阿里云的服务器,配置比较低,导致内存不够用。