mod_python statically linked to wrong python 2.7 version
Bug #1919923 reported by
Stefan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libapache2-mod-python (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
The mod_python.so in that package is statically linked to version 2.7.17 of libpython2.
However it depends on the python2.7-package which currently installs version 2.7.18 of libpython2.
In result i get the following error when apache2 tries to use mod_python:
[Thu Mar 18 01:00:04.123303 2021] [:error] [pid 5261:tid 140429445471296] python_init: Python version mismatch, expected '2.7.17', found '2.7.18'.
I did not try to build the module myself... but by hex-editing the version number inside mod_python.so i was able to circumvent the error.
Changed in libapache2-mod-python (Ubuntu): | |
status: | Incomplete → New |
To post a comment you must log in.
Hi Stefan,
Thank you for taking the time to report this bug and helping to make Ubuntu better.
I took a look at this further and found that python 2.7.17 is in Bionic and 2.7.18 is in Focal (see: rmadison libpython2.7). With that, I am a bit confused as to how are you facing this error.
Furthermore, I took a look a look at the .so and saw the same .so being linked for both, Focal and Bionic: apache2/ modules/ mod_python. so 0000) 7.so.1. 0 => /usr/lib/ x86_64- linux-gnu/ libpython2. 7.so.1. 0 (0x00007fc61fd4 8000) 64-linux- gnu/libc. so.6 (0x00007fc61f95 7000) 64-linux- gnu/libz. so.1 (0x00007fc61f73 a000) 64-linux- gnu/libpthread. so.0 (0x00007fc61f51 b000) 64-linux- gnu/libdl. so.2 (0x00007fc61f31 7000) 64-linux- gnu/libutil. so.1 (0x00007fc61f11 4000) 64-linux- gnu/libm. so.6 (0x00007fc61ed7 6000) ld-linux- x86-64. so.2 (0x00007fc6204e 8000)
$ ldd /usr/lib/
linux-vdso.so.1 (0x00007ffdfcdd
libpython2.
libc.so.6 => /lib/x86_
libz.so.1 => /lib/x86_
libpthread.so.0 => /lib/x86_
libdl.so.2 => /lib/x86_
libutil.so.1 => /lib/x86_
libm.so.6 => /lib/x86_
/lib64/
Now, I am a bit unsure as to how did you figure out that the .so is "statically" linked with is? Could you perhaps show us the output of `apt-cache policy libapache2- mod-python libpython2.7`? Because at this point, I am worried that you might somehow be running different versions of the two packages (one from Focal and the other from Bionic).
Whilst at it, could you also help me provide the steps to reproduce this error/failure?
Since there isn't enough information in your report to differentiate between a local configuration problem and a bug in Ubuntu, I'm marking this bug as "Incomplete" for now.
If indeed this is a local configuration problem, you can find pointers to get help for this sort of problem here: http:// www.ubuntu. com/support/ community. Or if you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" (http:// www.chiark. greenend. org.uk/ ~sgtatham/ bugs.html). We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New.
Once done, I'll be happy to take a look at this and figure out from there on. Thanks, again, for reporting this though! :)