Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
python 2.7 is already installed. See the updated question –  shanavascet May 12 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? –  shanavascet May 12 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 at 13:30
    
that was indeed the problem thank you bro :) –  shanavascet May 12 at 13:33
    
Cool. Good luck with your web development –  Sylvain Pineau May 12 at 13:34

Your Answer

 
discard

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.