简体   繁体   中英

Using .so of other python package

I what to take ' netifaces ' python package and load netifaces.cpython-35m-x86_64-linux-gnu.so with cython.cdll.LoadLibrary . But I get error:

  File "/usr/lib/python3.5/ctypes/__init__.py", line 360, in __getattr__
    func = self.__getitem__(name)
  File "/usr/lib/python3.5/ctypes/__init__.py", line 365, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /home/urosjarc/vcs-ss/sc7-admingui-scripts/htbin/netifaces.cpython-35m-x86_64-linux-gnu.so: undefined symbol: AF_INET

Does 1one knows how to resolve it?

▶ ldd netifaces.cpython-35m-x86_64-linux-gnu.so 
        linux-vdso.so.1 =>  (0x00007ffd01b72000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f264709c000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2646cd5000)
        /lib64/ld-linux-x86-64.so.2 (0x0000556b41e44000)

Is the netifaces package working for you? The error sounds like some missing dependencies. If it is working, then have a look how they load it. Then thet probably load another library as well, which contains the missing symbols.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM