erlang源码安装笔记

今天安装 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	 
#


由于我的机子已经装过php之类的应用,所以可能部分依赖库没有再重装了,有相关库文件缺失的可使用 yum自行安装。



//=========================== PS 遇到的比较难搞的问题 ========================================//

在make otp的过程中,出现了

g++: internal compiler error: Killed (program cc1plus) 错误,

刚开始以为是 编译依赖库的问题,一直没搞定

然后看了这个连接http://vb2005xu.iteye.com/blog/2171295,终于搞定了。

由于是我自己买的阿里云的服务器,配置比较低,导致内存不够用。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值