Thursday, May 6, 2010

Re: Mod_WSGI and lib python

On May 7, 7:34 am, When ideas fail <andrewkenyon...@gmail.com> wrote:
> Hi, I have been trying to setup mod_wsgi with apache 2
>
> but when I do:
>
> sudo a2enmod mod-wsgi
> sudo /etc/init.d/apache2 restart
>
> I get this error message:
>
> Restarting web server: apache2apache2: Syntax error on line 185 of /
> etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-
> enabled/mod-wsgi.load: Cannot load /usr/lib/apache2/modules/
> mod_wsgi.so into server: libpython2.7.so.1.0: cannot open shared
> object file: No such file or directory
>  failed!
>
> but I have that file here:
>
> /usr/local/lib/libpython2.7.so.1.0
>
> and i can do:
>
>  echo $LD_LIBRARY_PATH                                     :/usr/local/
> lib
>
> I imangine I have misunderstood something here, and its trying to find
> the libpython file somewhere else.
> Could somebody please help me, thanks

Go back and reinstall mod_wsgi and this time do the following:

make distclean
./configure --with-python=/usr/local/bin/python2.7
LD_RUN_PATH=/usr/local/lib make
sudo make install

Setting LD_RUN_PATH like that will force the directory '/usr/local/
lib' into the shared library search path of mod_wsgi.so file itself so
not dependent on your operating system knowing it should look in /usr/
local/lib.

Also read:

http://code.google.com/p/modwsgi/wiki/WhereToGetHelp

This question has nothing to do with Django and so you should really
have asked on the mod_wsgi mailing list.

Graham

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate