ncurses安装问题

在安装ruby的时候报如下错误:

/usr/bin/ld: /usr/lib/libncurses.a(lib_addch.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a 
shared object; recompile with -fPIC /usr/lib/libncurses.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [http://www.cnblogs.com/.ext/x86_64-linux/curses.so] Error 1
make[1]: Leaving directory `/home/deploy/tmp/ruby-
enterprise-1.8.6-20081215/source/ext/curses'
make: *** [all] Error 1

从错误中可以定位到可能是ncurses这个静态链接库的问题,从网上找了很久,解决方法如下在安装ncurses时如下方法安装:

$./configure --prefix=/usr --with-shared --without-debug --enable-widec
$make; make install

你可能感兴趣的:(ncurses安装问题)