1

I am trying to learn python web application development using Ubuntu 12.04. I have installed apache2 and enabled mod_wsgi using the command sudo a2enmod wsgi. Now when i try to restart the apache2 it shows the error

   apache2: Syntax error on line 210 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/wsgi.load: Cannot load /usr/lib/apache2/modules/mod_wsgi.so-2.7 into server: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
   ...fail!

I have checked the location usr/lib/apache2/modules/mod_wsgi.so-2.7 and this file is really present there. I am very new to python development. Please help.

UPDATE: I am updating my question to include Sylvain Pineau's susggestion. They Python 2.7 is already installed. When i run the command given by Sylvain Pineau i got

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libpython2.7 is already the newest version.
libpython2.7 set to manually installed.
python2.7 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Update: I have reinstalled python 2.7. it was broken. Thank Sylvain

1 Answer 1

1

libpython2.7.so.1.0: cannot open shared object file: No such file or directory

I'd suggest to install python2.7 (both the interpreter and the library):

sudo apt-get install --reinstall libpython2.7 python2.7

To find which package(s) provide libpython2.7.so.1.0 I used this query.

4
  • python 2.7 is already installed. See the updated question May 12, 2014 at 13:16
  • my libpython2.7.so.1.0 is located in /usr/lib. when i run ls-l it showed in red color. Is there anything to do with that? May 12, 2014 at 13:27
  • It should be light blue, red means a broken link. Try to reinstall both packages using sudo apt-get install --reinstall libpython2.7 python2.7 May 12, 2014 at 13:30
  • Cool. Good luck with your web development May 12, 2014 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .