Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6993037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:42:47+00:00 2026-05-27T19:42:47+00:00

I used this question/answer to install DB2 in Lion: How do I install IBM

  • 0

I used this question/answer to install DB2 in Lion: How do I install IBM DB2 Express-C on Mac OS X 10.7 Lion?

After configuring my databases, I am able to use db2 from the command line to execute queries, but the python modules ibm_db and PyDB2 both fail to import with the following error:

>>> import ibm_db
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Python/2.7/site-packages/ibm_db-1.0.4-py2.7-macosx-10.7-intel.egg/ibm_db.so, 2): Symbol not found: _dsIsDirServiceRunning
 Referenced from: /Users/<username>/sqllib/lib64/libdb2.dylib
 Expected in: /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService

How can I fix this and get ibm_db and PyDB2 to work properly with DB2 in Lion?

edit: moved answer to answers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:42:47+00:00Added an answer on May 27, 2026 at 7:42 pm

    You can change the db2 libraries using install_name_tool to look at the copied version of DirectoryService.framework, so you don’t have to change DYLD_LIBRARY_PATH

    Full credit goes to the following, I am simply updating this thread having been through the process of install db2 / ibm_db on Lion and finding this thread as one of the top hits via Google.

    http://www.ibm.com/developerworks/forums/thread.jspa?threadID=238136&start=30&tstart=0

    with other options described here:

    http://www.ibm.com/developerworks/forums/message.jspa?messageID=14604855#14604855

    The answer (should the above thread disappear):

    Copy the Snow Leopard DirectoryService.framework to

    /opt/SL_Frameworks/DirectoryService.framework 
    

    Then

    cd /opt/IBM/db2/V9.5/
    install_name_tool -change /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService /opt/SL_Frameworks/DirectoryService.framework/Versions/A/DirectoryService lib64/libdb2sec.dylib
    install_name_tool -change /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService /opt/SL_Frameworks/DirectoryService.framework/Versions/A/DirectoryService lib64/libdb2.dylib
    

    The referenced post mentions changing a third library

    libdb2e.dylib
    

    however, I have only installed the db2 client to use the ibm_db python module and this library is not present.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I haven't been able to find an answer to this question. I used Nu
I have used this question to learn install my python script as a service
EDIT: This question is more about language engineering than C++ itself. I used C++
I used the mapping solution from this question to have a joined component. But
I'm using markdown to edit this question right now. In some wikis I used
Forgive my ignorance in asking this basic question but I've become so used to
This is a really basic question but this is the first time I've used
This is just a curiosity question. I know that Spring can be used in
I know this is a darn simple question, but I'm very used to using
I'm sure this was asked somewhere in another question, but the wording used there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.