Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/ into server: cannot open shared object file: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.!

I have checked the location usr/lib/apache2/modules/ 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

share|improve this question
up vote 1 down vote accepted 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 I used this query.

share|improve this answer
python 2.7 is already installed. See the updated question – shanavascet May 12 '14 at 13:16
my is located in /usr/lib. when i run ls-l it showed in red color. Is there anything to do with that? – shanavascet May 12 '14 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 – Sylvain Pineau May 12 '14 at 13:30
that was indeed the problem thank you bro :) – shanavascet May 12 '14 at 13:33
Cool. Good luck with your web development – Sylvain Pineau May 12 '14 at 13:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.