Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

Failed to create libcouchbase instance: Failed to open shared object

1 reply [Last post]
  • Login or register to post comments
Thu, 01/24/2013 - 17:01
whosmer
Offline
Joined: 01/24/2013
Groups: None

I am helping to evaluate the Couchbase C++ SDK for my company, and I am writing some test code to do so. At first things went well, where I was installing onto a development machine where I had the root access needed to install the couchbase packages via yum.

However, now I am trying to run executables on our test machines where root access is much more limited. I am seeing this error, and not sure what it is telling me:

$ ./a.out
Failed to create libcouchbase instance: Failed to open shared object

The same exact executable works on the development machine.

I'm pretty sure that the answer is related to me copying the /usr/lib/libcouchbase* libraries from the dev machine to my home directory on the test machine, and then setting LD_LIBRARY_PATH to be able to find them there. I'm hoping that there isn't anything more complex happening, like somehow the compiled executables can never be run on any other machine...

While we play more with this, I thought that this forum might be able to help me figure out how to track down the exact meaning of this error message, and whether this could ever happen in our production environment (where we would have installed the libraries into the normal /usr/lib/* location).

Top
  • Login or register to post comments
Fri, 01/25/2013 - 23:27
trond
trond's picture
Offline
Joined: 03/15/2010
Groups: None

Libcouchbase tries to load a shared object containing the plugin for the "io operations" dynamically during initialization. If you don't link you application with a special linker path, the runtime linker will look in /usr/lib for the libcouchbase_* libraries. You may use LD_LIBRARY_PATH to have the linker to look elsewhere, or you can add a special path to your binary by using the -rpath option to the linker (some linker picks up the LD_RUN_PATH environment variable and adds that to the binary during linking as well)

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker