Re: nav installation, error 500
On Thu, 31 Jul 2014 23:07:36 +0400 Alexander Zubkov <green@...> wrote:
> I have installed NAV on Ubuntu 14.04 using this manual:
> But when I try to connect to server with my browser, I receive "500 Internal
> Server Error". This is what I see in apache's error.log:
> [remote 192.168.0.0:8082] File
> "/usr/lib/python2.7/dist-packages/nav/django/urls.py", line 22, in <module>
> [Thu Jul 31 20:59:00.542313 2014] [:error] [pid 938:tid 127863399364352]
> [remote 192.168.0.0:8082] from django.conf.urls.defaults import patterns,
> include, url
> [Thu Jul 31 20:59:00.542357 2014] [:error] [pid 938:tid 127863399364352]
> [remote 192.168.0.0:8082] ImportError: No module named defaults
> What is wrong with my installation?
Ubuntu 14.04 provides Django 1.6; NAV has not been tested on anything
newer than Django 1.4. This errors appears to be due to one of many
changes between Django 1.4 and 1.6.
The nav Debian package itself is probably wrong to assert the dependency
to 'python-django >= 1.4'.
You seem to have three options:
1. Downgrade to Django 1.4 by finding or building a package compatible
with Ubuntu 14.04.
2. Forcibly uninstall Django 1.4 and use
"pip install 'django>=1.4,<1.5'" to install a compatible version
outside of the APT system.
3. Hack /usr/lib/python2.7/dist-packages/nav/django/urls.py by replacing
from django.conf.urls.defaults import patterns, include, url
from django.conf.urls import patterns, include, url
and then pray everything will otherwise work fine on Django 1.6.
There is a high chance, however, that there will be further errors.
We are generally tracking Debian stable for development dependencies,
with a few exceptions, which we are packaging ourselves. Debian are
planning to freeze their next stable release around the 5th of November,
which means we may start looking at making NAV work with whatever
version of Django they freeze on around that time.