Mod_wsgi.so: I can’t upload mod_wsgi.so to the server: libpython2.5.so.1.0: cannot open the shared objects file: there is no such file or directory

when i print:

[root@lts5 /]# ldd /usr/lib64/httpd/modules/mod_wsgi.so
    libpython2.5.so.1.0 => /root/epd-5.1.0/lib/libpython2.5.so.1.0 (0x00002b4b53ccf000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b4b54036000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00002b4b54251000)
    libutil.so.1 => /lib64/libutil.so.1 (0x00002b4b54456000)
    libc.so.6 => /lib64/libc.so.6 (0x00002b4b54659000)
    libm.so.6 => /lib64/libm.so.6 (0x00002b4b549b1000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003d9f600000)

How can I make it possible that upon input:

[root@lts5srv1 /]# ldd mod_wsgi.so
ldd: ./mod_wsgi.so: No such file or directory

.. showing the same result?

In fact, when I try to restart the server:

[root@lts5srv1 mod_wsgi-2.3]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: httpd: Syntax error on line 202 of /etc/httpd/conf/httpd.conf: 
Cannot load /etc/httpd/modules/mod_wsgi.so into server: 
libpython2.5.so.1.0: cannot open shared object file: No such file or directory
                                                           [FAILED]
+5
source share
2 answers

Running 'ldd mod_wsgi.so' will only work if you are in the same directory as the mod_wsgi.so file.

Explain why you are using such an old version of mod_wsgi. Did you compile mod_wsgi yourself from the source code or did you use the existing binary for mod_wsgi?

If you are compiling the source code, use mod_wsgi 3.4 (the latter), when you create it from the source, do it like:

LD_RUN_PATH=/root/epd-5.1.0/lib make

LD_RUN_PATH Python mod_wsgi.so, , , .

+3
  • 1- /etc/ld.so.conf:

    /usr/local/lib
    include ld.so.conf.d/*.conf
    
  • ldconfig

0

All Articles