spotify / sparkey

Simple constant key/value storage library, for read-heavy systems with infrequent large bulk inserts.
Apache License 2.0
1.18k stars 81 forks source link

libsparkey.so.0: cannot open shared object file #5

Closed janpieper closed 11 years ago

janpieper commented 11 years ago

I just installed sparkey (Commit: ec80630f) on my local maschine (Ubuntu 12.04) like described in the README file:

$ git clone git@github.com:spotify/sparkey.git
$ cd sparkey
$ autoreconf --install
$ ./configure
$ make
$ make check
$ sudo make install

But if I want to execute sparkey, I get the following error:

$ sparkey
sparkey: error while loading shared libraries: libsparkey.so.0:
  cannot open shared object file: No such file or directory

Can someone please tell me, where sparkey is searching for the file because it is available in /usr/local/lib:

$ ls -la /usr/local/lib/ | grep sparkey
-rw-r--r-- 1 root root  79842 Sep  3 16:02 libsparkey.a
-rwxr-xr-x 1 root root    974 Sep  3 16:02 libsparkey.la
lrwxrwxrwx 1 root root     19 Sep  3 16:02 libsparkey.so -> libsparkey.so.0.0.0
lrwxrwxrwx 1 root root     19 Sep  3 16:02 libsparkey.so.0 -> libsparkey.so.0.0.0
-rwxr-xr-x 1 root root  50900 Sep  3 16:02 libsparkey.so.0.0.0

I also tried to copy/symlink the files to /usr/lib but this didn't work.

nresare commented 11 years ago

After installing new libraries in one of the system library directories you need to run the 'ldconfig' command (as root)

nresare commented 11 years ago

Reproducing your steps on a fairly vanilla Ubuntu 1204 box shows that the missing 'ldconfig' invocation was indeed what was missing.

If you want to experiment with sparkey without manually installing files on your filesystem you can use the included debian packaging. If you have the appropriate tools installed (at least the package devscripts) you should be able to build sparkey packages by running the command 'debuild' in the cloned git repository

janpieper commented 11 years ago

Arghs, you're right. Thanks!