[pylucene-dev] PyLucene CherryPy threads conflict

Álvaro Falquina Garrido afalquina at mac.com
Thu Jul 27 11:52:22 PDT 2006


I have been porting my PyLucene/CherryPy application from Windows  
2000 to Fedora Core 5 Linux. I have found a couple of problems and  
their work-arounds.  Maybe this could be added to Pravin's FAQ.

To install PyLucene 2.0.0 in Fedora Core 5 I have used the Ubuntu  
build available at PyLucene's home page. When importing PyLucene I  
got this error:

ImportError: /usr/lib/python2.4/site-packages/_PyLucene.so: cannot  
restore segment prot after reloc: Permission denied.

This has to do with Fedora's default configuration of SELinux.  
Instead of disabling SELinux it is enough to execute this command:

chcon -t texrel_shlib_t /usr/lib/python2.4/site-packages/_PyLucene.so

But then CherryPy crashes with an error: (11, 'Resource temporarily  
unavailable'). This behaviour is described in http://www.cherrypy.org/ 
ticket/479. The page includes a patch (adding two lines to  
_cpwsgiserver.py) that fixes the problem. After that, everything  
seems to work fine so far.


More information about the pylucene-dev mailing list