[mod_python] Apache fails to start: ImportError: No module named mod_python.apache

richard offer richard at whitequeen.com
Sun May 28 11:01:05 EST 2000


Apache is failing to start when I have mod_python as a DSO on RH 6.1.

The report from the apache error log is

Traceback (innermost last):
  File "<string>", line 1, in ?
ImportError: No module named mod_python.apache
PythonInitFunction: could not import mod_python.apache.

I've rebuilt python to live under the same top level directory as Apache

[root at erij bin]# ls /usr/www/lib/python1.5/site-packages/mod_python/
__init__.py   apache.py   cgihandler.py   httpdapi.py   zhandler.py
__init__.pyc  apache.pyc  cgihandler.pyc  httpdapi.pyc  zhandler.pyc

[root at erij bin]# ls /usr/www/libexec/
httpd.exp         mod_autoindex.so  mod_include.so      mod_rewrite.so
libproxy.so       mod_cern_meta.so  mod_info.so         mod_setenvif.so
mod_access.so     mod_cgi.so        mod_log_agent.so    mod_speling.so
mod_actions.so    mod_digest.so     mod_log_config.so   mod_status.so
mod_alias.so      mod_dir.so        mod_log_referer.so  mod_unique_id.so
mod_asis.so       mod_env.so        mod_mime.so         mod_userdir.so
mod_auth.so       mod_example.so    mod_mime_magic.so   mod_usertrack.so
mod_auth_anon.so  mod_expires.so    mod_mmap_static.so  mod_vhost_alias.so
mod_auth_db.so    mod_headers.so    mod_negotiation.so
mod_auth_dbm.so   mod_imap.so       mod_python.so

[root at erij bin]# ldd /usr/www/libexec/mod_python.so 
        libpthread.so.0 => /lib/libpthread.so.0 (0x400a9000)
        libc.so.6 => /lib/libc.so.6 (0x400bb000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

[root at erij bin]# /usr/www/bin/python
Python 1.5.2 (#1, May 28 2000, 08:30:59)  [GCC egcs-2.91.66 19990314/Linux (egcs- on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import mod_python
>>> from mod_python import apache
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "/usr/www/lib/python1.5/site-packages/mod_python/apache.py", line 18, in ?
    import _apache
ImportError: No module named _apache

[ I don't expect this last one to work, but its at least picking up the
right module ]

Can someone hit me with a clue stick.


richard offer @ home 

More information about the Mod_python mailing list