Ruby and socket.so

(Peter Lerche) #1

Hi,

When I "require socket" in my application I get following error.

/usr/local/lib/ruby/1.8/x86_64-linux/socket.so: cannot open shared object
file: No such file or directory
- /usr/local/lib/ruby/1.8/x86_64-linux/socket.so

The socket.so is of course located in above directory.

Ruby test file.
require "socket"
if $0 == __FILE__
   print "Hello World"
end

My ruby version is: ruby 1.8.2 (2004-12-25) [x86_64-linux]

Any help would be appriciated.

···

--
Peter Lerche
-------------------------------------
Linux/BSD Dedicated Server Hosting
Advanced Server Tools included
Maximum Server Control with no Limits
-------------------------------------

(Joel VanderWerf) #2

Peter Lerche wrote:

Hi,

When I "require socket" in my application I get following error.

/usr/local/lib/ruby/1.8/x86_64-linux/socket.so: cannot open shared object
file: No such file or directory
- /usr/local/lib/ruby/1.8/x86_64-linux/socket.so

The socket.so is of course located in above directory.

What does this command output:

ldd /usr/local/lib/ruby/1.8/x86_64-linux/socket.so

On my system i get:

$ ldd /usr/local/lib/ruby/1.8/i686-linux/socket.so
                libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7fde000)
        libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7fb0000)
        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f8f000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e62000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

I think the error message you are getting is saying that one of the
dependencies cannot be found, not that socket.so can't.

···

--
      vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407