Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim doesnt load after removing rvm (libruby.so.1.8: cannot open shared object file)

I've removed recently rvm and reinstalled it, that worked fine.
But now, when I'm trying to start vim or gvim, I'm getting the following error message:

vim: error while loading shared libraries: libruby.so.1.8: cannot open shared object file: No such file or directory"

Googling wasn't very helpful for me here.
I'm on Ubuntu 11.10.

Does anyone know this problem or could anyone give me a hint where I should look in detail?

like image 643
spaudanjo Avatar asked Jan 16 '12 00:01

spaudanjo


1 Answers

On my Ubuntu system, vim is compiled against Ruby and the linker/loader ld.so(8) finds the libruby1.8 library here:

$ ldd `which vim` | grep ruby
libruby1.8.so.1.8 => /usr/lib/libruby1.8.so.1.8 (0x00007f0184795000)

$ dlocate /usr/lib/libruby1.8.so.1.8
libruby1.8: /usr/lib/libruby1.8.so.1.8.7
libruby1.8: /usr/lib/libruby1.8.so.1.8

If you install the libruby1.8 package with sudo apt-get install libruby1.8, then the library will be available for your vim to use. I do not know why rvm would choose to mess with system-supplied Ruby installs but that sounds like a misconfiguration of rvm to me.

Another option is that your vim was self-compiled against one specific version of Ruby as managed by rvm. If this is the case, and you liked that setup, then install whatever version of Ruby you want with rvm, rebuild your vim with the path to your customized Ruby installation, and re-install vim.

(If the preceding paragraph made no sense, I strongly recommend sticking to the distribution-provided vim package.)

like image 111
sarnold Avatar answered Oct 21 '22 19:10

sarnold