CAIDA midar 安装过程

来源:互联网 发布:流动人口数据在哪里 编辑:程序博客网 时间:2024/05/16 04:47



1.安装ruby

   要求版本高于1.8.6 ,安完别忘了看看$PATH有无路径添加上。。

PS:重装ruby时中间还迷迷糊糊遇到了一个 warning:

It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby.
解决如下:参考


2.安装rubyGems

   cd rubygems-xx

   ruby setup.rb

安装的过程中遇到cannot load such file -- zlib (LoadError)难过问题,参考了网址redhat安装gem包  的解决方法,应该是ruby安装过程中没有编译zlib

此时进入ruby的文件目录下面,

cd ruby-1-9-x/

cd ext

cd zlib

ruby extconf.rb

make

make install

即可。(也试过自己安装zlib 不过不成功。。。果然还是自己渣)


3.安装mper

./configure --enable-debug

make

make install

4. 安装mperio

gem install rb-mperio-xxx.gem

Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources的错误 。无语。查看系统的openssl版本,发现系统已安装openssl-0.9.8版本

于是cd ruby-1-9-x

cd ext

cd openssl

ruby extconf.rb --with-openssl-include=xxxx --with-openssl-lib=xxxx

结果运行出现

=== OpenSSL for Ruby configurator ===
=== Checking for system dependent stuff... ===
checking for t_open() in nsl.lib... no
checking for socket() in socket.lib... no
checking for unistd.h... no
checking for sys/time.h... no
checking for assert.h... yes
=== Checking for required stuff... ===
checking for openssl/ssl.h... no
checking for openssl/ssl.h... no
=== Checking for required stuff failed. ===
Makefile wasn't created. Fix the errors above.

欲哭无泪啊。。。快哭了

于是找了check不通过的解决方法:下面的在我的服务器上能行得通(Linux version 2.6.18-348.el5 (gcc version 4.1.2  (Red Hat 4.1.2-54))

重新下载openssl-0.9.8版本,指定目录下安装(因为我的是x86_64位机器,故添加-fPIC enable-shared 否则后面报了另外一个bug:

 /lib/libssl.a(s2_meth.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
xx/lib/libssl.a: could not read symbols: Bad value
  苦逼地来回重装了好几次openssl)

./config --prefix=/usr/local/openssl-fPIC enable-shared

make depend

make

make install

然后,重新cd xx/ ext/openssl/

ruby extconf.rb --with-openssl-lib=/usr/local/openssl/lib/ --with-openssl-include=/usr/local/openssl/include

make

make install

安装完成后,继续gem install rb-mperio-xx.gem 再次被振懵,

继续报Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources 错误。。。。。。。

嗯...查看$PATH并修改环境变量

vim /etc/profile

找到$PATH一行

export PATH=/usr/local/openssl/bin:/usr/local/ruby/bin:$PATH

save 后,source /etc/profile 使之立刻生效

然后重新gem install ,终于rb-mperio成功了。。。大哭

诸多参考:参考文章1  ,Ruby参考手册 ,点击打开链接


5.安装其他的arkutil,midar

gem install arkutil.xx.gem

cd midar-4.xx/

./configure

make

即可。

在安装midar过程中遇到了一个很讨厌的小插曲,就是安装完成midar之后,执行midar-full 报

GetOptionsFromString" is not exported by the Getopt::Long module 错误,导致无法执行,在查阅资料后发现

是因为perl版本升级的不兼容问题造成的。

查看本机版本是5.8.8 ,后来将perl 升级到5.10.1后 问题解决。






0 0
原创粉丝点击