El Capitan, ModWsgi and Django

It is with a sense of bravery that I attempt any major OSx upgrade and this recent adventure only proves that I am right to approach with caution. It seems almost apt that the new OS is called El Capitan. Anyway, onto business.

The El Capitan upgrade will destroy your apache install and most modules will be uncommented. You will need to get into the http.conf file and sort this out.

Key issues include:

  • A missing mod_wsgi module.
  • A broken MySQLdb module.

To deal with the Mod_WSGI error you will need to reinstall the module.  I tried the manual approach and failed with install: /usr/libexec/apache2/mod_wsgi.so: Operation not permitted
apxs:Error: Command failed with rc=4653056.  
After chatting to Graham he suggested a pip approach and then linking to the file in situ.  Read about it on https://github.com/GrahamDumpleton/mod_wsgi/issues/98

Next I encountered problems with MySQLdb with unsafe use of relative rpath libmysqlclient.18.dylib which I solved by following http://stackoverflow.com/questions/31343299/mysql-improperly-configured-reason-unsafe-use-of-relative-path.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.