Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Default configuartion for Python 2.7.3 in Ubuntu 12.04

  1. #11
    Join Date
    Nov 2011
    Beans
    6

    Re: Default configuartion for Python 2.7.3 in Ubuntu 12.04

    I rebuilt my linode with a refresh 12.04 install, and redid everything, using your advice for libapache2-mod-python. I ran into some troubles with debuild:

    gpg: /tmp/debsign.AP3oIkNT/libapache2-mod-python_3.3.1-9ubuntu1.dsc: clearsign failed: secret key not available
    debsign: gpg error occurred! Aborting....
    debuild: fatal error at line 1271:
    running debsign failed
    )
    so I ended up using:

    sudo debuild -i -us -uc -b

    I still get a warning in the apache error log whenever I restart apache:
    [Tue Nov 27 08:01:03 2012] [warn] mod_wsgi: Compiled for Python/2.7.2+.
    [Tue Nov 27 08:01:03 2012] [warn] mod_wsgi: Runtime using Python/2.7.3.
    [Tue Nov 27 08:01:03 2012] [notice] Apache/2.2.22 (Ubuntu) mod_wsgi/3.3 Python/2.7.3 configured -- resuming normal operations
    But no error. However, my django app still does not work. Hard to tell whether this is the issue though, since I also have other pieces installed like rabbitmq and memcached. Lot's could go wrong, I suppose, but I don't see any errors showing up in the apache error log despite getting this on the request:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, [redacted] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Apache/2.2.22 (Ubuntu) Server at [redacted].com Port 80
    Any ideas on how to debug this issue? I put al little test index.html in the html root, and that loads fine, so at least apache is working.

    Edit: Nevermind, I found the django log. The issue is:

    ImportError: No module named django.core.wsgi
    I can try to debug this on my own tomorrow. Thanks!
    Last edited by LotsOfStuff; November 27th, 2012 at 09:44 AM. Reason: new info

  2. #12
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,297
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Default configuartion for Python 2.7.3 in Ubuntu 12.04

    Quote Originally Posted by LotsOfStuff View Post
    I rebuilt my linode with a refresh 12.04 install, and redid everything, using your advice for libapache2-mod-python. I ran into some troubles with debuild:
    That is fine, you can ignore it.

    so I ended up using:

    sudo debuild -i -us -uc -b
    Never run debuild with sudo! (In general, never use sudo unless you are certain that you need it.)

    I'm not sure what you did wrong but on mymachine after rebuilding libapache2-mod-python and installing the resulting package, I do not get those warnings anymore after restarting Apache.
    「明後日の夕方には帰ってるからね。」


  3. #13
    Join Date
    Mar 2013
    Beans
    2

    Re: Default configuartion for Python 2.7.3 in Ubuntu 12.04

    # You have to recompile mod-python and/or mod-wsgi.


    # Remove mods
    apt-get remove libapache2-mod-python libapache2-mod-wsgi


    # Get dependencies
    apt-get build-dep libapache2-mod-python libapache2-mod-wsgi


    # Build mod-python
    mkdir /tmp/python
    cd /tmp/python
    apt-get source libapache2-mod-python
    cd libapache2-mod-python-[x.x.x]
    dpkg-buildpackage -rfakeroot -b


    #Build mod-wsgi
    mkdir /tmp/wsgi
    cd /tmp/wsgi
    apt-get source libapache2-mod-wsgi
    cd mod-wsgi-[x.x.x]
    dpkg-buildpackage -rfakeroot -b


    # Install newly compiled packages
    dpkg -i /tmp/python/libapache2-mod-python-[x.x].deb /tmp/wsgi/libapache2-mod-wsgi-[x.x].deb

  4. #14
    Join Date
    Aug 2011
    Location
    Athens, Greece
    Beans
    1
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: Default configuartion for Python 2.7.3 in Ubuntu 12.04

    Nice!

    But you have to install fakeroot before building anything or you 're getting an error:

    Code:
    # apt-get install fakeroot
    Quote Originally Posted by roberthernandez View Post
    # You have to recompile mod-python and/or mod-wsgi.


    # Remove mods
    apt-get remove libapache2-mod-python libapache2-mod-wsgi


    # Get dependencies
    apt-get build-dep libapache2-mod-python libapache2-mod-wsgi


    # Build mod-python
    mkdir /tmp/python
    cd /tmp/python
    apt-get source libapache2-mod-python
    cd libapache2-mod-python-[x.x.x]
    dpkg-buildpackage -rfakeroot -b


    #Build mod-wsgi
    mkdir /tmp/wsgi
    cd /tmp/wsgi
    apt-get source libapache2-mod-wsgi
    cd mod-wsgi-[x.x.x]
    dpkg-buildpackage -rfakeroot -b


    # Install newly compiled packages
    dpkg -i /tmp/python/libapache2-mod-python-[x.x].deb /tmp/wsgi/libapache2-mod-wsgi-[x.x].deb

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •