liuxiaochen 2010-12-17
今天在hp-ux11.11pa平台安装ruby和oci8,ruby版本为1.8.6-p114,安装过程一切正常,但安装完成后执行irb校验时报如下错误
irb(main):001:0>require'oci8'
LoadError:Can'tdlopen()alibrarycontainingThreadLocalStorage:/usr/lib/libpthread.1-/ora10gdata/dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/hppa2.0w-hpux11.11/oci8lib.sl
from/ora10gdata/dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/hppa2.0w-hpux11.11/oci8lib.sl
from/ora10gdata/dbra/app/lib/ruby/lib/ruby/site_ruby/1.8/oci8.rb:20
from(irb):1:in`require'
from(irb):1
irb(main):002:0>exit
一般碰到此类问题,都较难解决,尤其在万恶的hp平台上。解决过程如下:
1、删除ruby,oci8
2、重新安装ruby,注意添加环境变量和修改Makefile关键步骤
exportLDOPTS="+s-L/usr/local/lib-L/usr/local/lib/hpux32"
exportCFLAGS="-lcl-lpthread"
./configure--prefix=/ora10gdata/dbra/app/lib/ruby*
修改Makefile
LIBS=-ldld-lcrypt-lm-lcl$(EXTLIBS)
gmake
gmakeinstall
3、再次安装oci8