I have an RHEL 7 system with Python 3.11.9; I didn't set it up or do the base python install and can't run yum so unfortunately I have limited information about the ins and outs of its configuration.
When I try to import the sqlite3 module in python, I get this error:
ImportError: /some/path/to/python/lib/python3.11/lib-dynload/_sqlite3.cpython-311-x86_64-linux-gnu.so: undefined symbol: sqlite3_trace_v2
on guidance from a server admin, I checked that .so file with nm and this I think confirms the symbol really isn't in there (along with quite a lot of others)
U sqlite3_trace
Looking at the system, I see /usr/lib64/libsqlite3.so.0.8.6 Jan 13 2020 /usr/bin/sqlite Jan 13 2020
The binary reports it's 3.31.1, since the dates match I assume those correspond. 3.31 exceeds the Python 3.11 requirement of 3.7.15. Neither sqlite3.h nor sqlite3ext.h exist in /usr/include.
With all that I'm not sure what to think happened-- My (admittedly limited) compiler understanding is that undefined symbols imply the lib-dynload object was compiled against a library missing what each symbol pertains to, but the version numbers here suggest the version dependency is met so I don't see why that would be.
Lastly, I found this result that talks about an environment variable causing compilation to produce incorrect results, I don't know if that's comparable to my situation but I do know the user that python was installed as sets LD_LIBRARY_PATH with a bunch of stuff in it I'm unfamiliar with.
Would appreciate some insight as getting into shared libraries and compiling is about where my linux understanding ends.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744126937a4559658.html
评论列表(0条)