Trac Failes After Portupgrade On FreeBSD

trac_errorRecently I upgraded my FreeBSD1 ports with `portupgrade -a`. Everything seems to be fine but I discovered later that something was wrong with the Python installation. I use Trac for the OnionCat page and it showed an error message: “TracError: Cannot load Python bindings for SQLite” (see Fig.). Actually I discovered this by accident while I was looking at the web server’s log file. There where some HTTP 500 errors.

Although Python 2.7 was installed as well as sqlite3 and py27-sqlite3 still something did not really work. Running Python on the command line and trying to `import sqlite` did not work. Unfortunately, I don’t know much about Python and how it organizes its modules (Yes, Python is one of those languages that I still deny — I grew up with Perl ;)). I had a look at the error log of the Apache web server and it still said “Python/2.6.8”. Thus, I had the idea that maybe something went wrong during the upgrade of the ports (although it did not fail).

The solution was to manually recompile and reinstall python, trac, mod_wsgi, and py-sqlite3 from the ports tree. Finally don’t forget to restart the Apache server.

  1. FreeBSD 8.2 running Apache 2.2 with mod_wsgi 3.4 and Trac 0.12.