简体   繁体   中英

Error while compiling Ruby (RVM)

OS : Ubuntu 12.04

Ruby : 1.9.3

I'd want to install Ruby with RVM but when I type:

$> rvm install ruby

I have an error while compiling:

/usr/bin/ld: /usr/lib/libX11.a(CrGlCur.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libX11.a: could not read symbols: Bad value
collect2: ld a retourné 1 code d'état d'exécution
make[2]: *** [../../.ext/x86_64-linux/tcltklib.so] Erreur 1
make[2]: quittant le répertoire « /home/lingla_j/.rvm/src/ruby-1.9.3-p194/ext/tk »
make[1]: *** [ext/tk/all] Erreur 2
make[1]: quittant le répertoire « /home/lingla_j/.rvm/src/ruby-1.9.3-p194 »
make: *** [build-ext] Erreur 2

Thanks for helping!

It looks like you are compiling ruby against static version of libraries, this could happen in rather few rare cases.

Make sure you read rvm requirements and install all required libraries.

Check your RVM configuration files for compilation switches:

cat /etc/rvmrc ~/.rvmrc

And finally reinstall ruby to make sure clean installation is done:

rvm reinstall 1.9.3

As a note right now it's equivalent to rvm install ruby as 1.9.3 is the latest version of ruby.

您可以通过bash bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)安装rvm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM