Home Help Center

I can`t run py examples in mac-os

ACMACM Member Alberto CasadoOrganization: QualityObjectsProject: research
Hi all, I download the binary distribution (3.0.1)for mac-os, and when I try to run the hello example from the demospy for Mac-os I have the following message when running Server.py:

Traceback (most recent call last):
File "Server.py", line 11, in ?
import sys, traceback, Ice
File "/Applications/Ice-3.0.1/python/Ice.py", line 15, in ?
import IcePy
ImportError: dlopen(/Applications/Ice-3.0.1/python/IcePy.so, 2): Library not loaded: /Users/benoit/tmp/iceinstall/Ice-3.0.1/lib/libIce.30.dylib
Referenced from: /Applications/Ice-3.0.1/python/IcePy.so
Reason: image not found

Can any body help me?.

thank you in advance.

ACM.

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Did you add "/Applications/Ice-3.0.1/lib" to your DYLD_LIBRARY_PATH?

    If you don't want to have to set DYLD_LIBRARY_PATH, you can also modify the install names embedded in the Ice libraries (use "otool -L" to see the dependant libraries) with the Mac OS X "install_name_tool utility".

    For example:
      install_name_tool -change /Users/benoit/tmp/iceinstall/Ice-3.0.1/lib/libIce.30.dylib /Applications/Ice-3.0.1/lib/libIce.30.dylib  /Applications/Ice-3.0.1/python/IcePy.so
    

    See the man page of "install_name_tool" for more information.

    Cheers,
    Benoit.
  • ACMACM Member Alberto CasadoOrganization: QualityObjectsProject: research
    Hi, it is my very first time on Mac-os and I was using LD_LIBRARY_PATH as the environment varible. Again you are right.

    thank you.

    ACM.
  • ACMACM Member Alberto CasadoOrganization: QualityObjectsProject: research
    hi again benoit, this morning i run the server and works :) . I thought all were rigth, this afternoon i came back to the example an when i run the client i found the following error message:

    interna195:~/Desktop/ICE-MAC/Ice-3.0.1-demos/demopy/Ice/hello quality$ python Client.py
    Traceback (most recent call last):
    File "/Users/quality/Desktop/ICE-MAC/Ice-3.0.1/python/Ice.py", line 487, in main
    status = self.run(args)
    File "Client.py", line 42, in run
    twoway = Demo.HelloPrx.checkedCast(\
    File "/Users/quality/Desktop/ICE-MAC/Ice-3.0.1/python/Ice.py", line 157, in stringToProxy
    return self._impl.stringToProxy(str)
    DNSException: exception ::Ice::DNSException
    {
    error = 7
    host = interna195.qualityobjects.com
    }

    :confused:

    can you help me againg?

    ACM.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    The "Ice.DNSException" indicates that the Ice client couldn't resolve the hostname "interna195.qualityobjects.com". More specifically, the "getaddrinfo" system call failed with the error code 7 which on Mac OS X means "no address associated with hostname". You should look into the network configuration of your machine or add this name to your DNS server.

    Alternatively, you can change the configuration of the demo and define Ice.Default.Host to 127.0.0.1 to use the loopback interface (or you can set it to the IP address of your machine).

    Cheers,
    Benoit.
  • ACMACM Member Alberto CasadoOrganization: QualityObjectsProject: research
    Hello benoit,

    Thank you again.

    ACM.
Sign In or Register to comment.