编译 Ruby 时出现 recompile with -fPIC 的错误
PHPz
PHPz 2017-04-22 08:59:33
0
1
1080

今天在编译 Ruby 的时候,在 make 出现了一个错误:

linking shared-object fiddle.so
/usr/bin/ld: ./libffi-3.2.1/.libs/libffi.a(raw_api.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
./libffi-3.2.1/.libs/libffi.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [../../.ext/x86_64-linux/fiddle.so] Error 1
make[2]: Leaving directory `/home/simowce/ruby-2.2.0/ext/fiddle'
make[1]: *** [ext/fiddle/all] Error 2
make[1]: Leaving directory `/home/simowce/ruby-2.2.0'
make: *** [build-ext] Error 2

我不知道究竟是什么意思。 Ruby 的源码是在 ruby-lang 上下载的,版本是 2.2.0 。请大家帮帮我,谢谢!

PHPz
PHPz

学习是最好的投资!

reply all(1)
洪涛

Please install the development package of libffi (such as libffi-dev).

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template