title: mod_wsgi is compiled in one version and running in a different version even after following the given steps
body: <p>I am getting an error when I run the apache server through my client after going through the log I understood that the mod_wsgi uses python 2.6 during compiling and uses python 2.7 for running. After some research in the Internet I followed the below steps:</p>
  <h1>You have to recompile mod-python and/or mod-wsgi.</h1>
  <h1>Remove mods</h1>
  <pre><code>apt-get remove libapache2-mod-python libapache2-mod-wsgi
  </code></pre>
  <h1>Get dependencies</h1>
  <pre><code>apt-get build-dep libapache2-mod-python libapache2-mod-wsgi
  </code></pre>
  <h1>Build mod-python</h1>
  <pre><code>mkdir /tmp/python
  cd /tmp/python
  apt-get source libapache2-mod-python
  cd libapache2-mod-python-[x.x.x]
  dpkg-buildpackage -rfakeroot -b
  </code></pre>
  <h1>Build mod-wsgi</h1>
  <pre><code>mkdir /tmp/wsgi
  cd /tmp/wsgi
  apt-get source libapache2-mod-wsgi
  cd mod-wsgi-[x.x.x]
  dpkg-buildpackage -rfakeroot -b
  </code></pre>
  <h1>Install newly compiled packages</h1>
  <p>dpkg -i /tmp/python/libapache2-mod-python-[x.x].deb /tmp/wsgi/libapache2-mod-wsgi-[x.x].deb</p>
  <p>It was of no use, now the version has changed to 3.2, I am worried about the space being consumed through the above steps and now the compiling python has changes to python 3.2 from 2.6 but the python used for running is still 2.7. please help me with what to do ? to get back my apache server running successfully.</p>
  <p>error.log::::</p>
  <pre><code>[Wed Aug 21 11:48:11 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
  [Wed Aug 21 11:48:11 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
  [Wed Aug 21 11:48:11 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
  [Wed Aug 21 11:48:36 2013] [notice] caught SIGTERM, shutting down
  
  
  [Wed Aug 21 22:48:29 2013] [error] child process 1226 still did not exit, sending a SIGKILL
  [Wed Aug 21 22:48:30 2013] [notice] caught SIGTERM, shutting down
  [Wed Aug 21 22:56:17 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
  [Wed Aug 21 22:56:17 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
  [Wed Aug 21 22:56:17 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
  [Thu Aug 22 01:32:12 2013] [notice] caught SIGTERM, shutting down
  [Thu Aug 22 01:32:26 2013] [warn] mod_wsgi: Compiled for Python/2.7.2+.
  [Thu Aug 22 01:32:26 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
  [Thu Aug 22 01:32:26 2013] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
  [Thu Aug 22 04:04:48 2013] [notice] child pid 11212 exit signal Segmentation fault (11)
  [Thu Aug 22 04:04:48 2013] [notice] caught SIGTERM, shutting down
  [Thu Aug 22 04:04:56 2013] [notice] mod_python: Creating 8 session mutexes based on 6 max processes and 25 max threads.
  [Thu Aug 22 04:04:56 2013] [notice] mod_python: using mutex_directory /tmp  
  [Thu Aug 22 04:04:56 2013] [warn] mod_wsgi: Compiled for Python/3.2.3.
  [Thu Aug 22 04:04:56 2013] [warn] mod_wsgi: Runtime using Python/2.7.3.
  [Thu Aug 22 04:04:56 2013] [notice] Apache/2.2.22 (Ubuntu) mod_python/3.3.1 Python/2.7.3      mod_wsgi/3.3 configured -- resuming normal operations
  </code></pre>
  <p>Thank you</p>