[mod_python] undefined symbol: forkpty

Graham Dumpleton graham.dumpleton at gmail.com
Sun Jul 29 07:13:30 EDT 2007

On 28/07/07, Gustavo Steigert <steigert at gmail.com> wrote:
> Hi guys,
> I installed Apache2 (from source) and it worked fine. Then I installed
> mod_python (also from source) and no error was shown; after, I configured
> the httpd.conf for loading mod_python, and now when I try to start apache,
> it says:
>  httpd: Syntax error on line 54 of
> /usr/local/apache2/conf/httpd.conf: Cannot load
> /usr/local/apache2/modules/mod_python.so into server:
> /usr/local/apache2/modules/mod_python.so: undefined symbol:
> forkpty
> Version information:
> httpd 2.2.4
> mod_python 3.3.1
> fedora 7Can anyone please help?

The forkpty function isn't even used by mod_python, although it is
used in the Python 'posix' module which would probably be
automatically loaded by Python at startup.

What I would suggest is the problem is that whatever system library
defines that function isn't being linked into Apache when it is being

First step would thus be to find out which system library contains
that function. To do this, run 'nm' on each of the system libraries in
/usr/lib until you find it. On Linux box I have access to the library
is libutil.

$ nm libutil.a | grep forkpty
00000000 T forkpty

Make sure this library is linked into Apache, preferably as a shared
library as Apache itself may not require the function and wouldn't
link it in if libutil is a static library.


More information about the Mod_python mailing list