openstack-dashboard-ubuntu-theme安装包时出错

时间:2022-07-20 23:40:05

I'm trying implement elastic search in my Django application. For that i need to install open JDK-7 in my ubuntu 16.04 system. While installing i'm getting the following error.

我正在尝试在我的Django应用程序中实现弹性搜索。为此我需要在我的ubuntu 16.04系统中安装打开的JDK-7。安装时我收到以下错误。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libatk-wrapper-java libatk-wrapper-java-jni openjdk-7-jre
Suggested packages:
  openjdk-7-demo openjdk-7-source visualvm icedtea-7-jre-jamvm sun-java6-fonts
  fonts-ipafont-gothic fonts-ipafont-mincho fonts-indic
The following packages will be REMOVED:
  openstack-dashboard-ubuntu-theme
The following NEW packages will be installed:
  libatk-wrapper-java libatk-wrapper-java-jni openjdk-7-jdk openjdk-7-jre
  openjdk-7-jre-headless
0 upgraded, 5 newly installed, 1 to remove and 28 not upgraded.
2 not fully installed or removed.
Need to get 0 B/55.9 MB of archives.
After this operation, 77.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 515256 files and directories currently installed.)
Removing openstack-dashboard-ubuntu-theme (2:9.1.0-0ubuntu1) ...
Collecting and compressing static assets...
Traceback (most recent call last):
  File "manage.py", line 25, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 302, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 43, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 99, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/share/openstack-dashboard/openstack_dashboard/settings.py", line 381, in <module>
    from openstack_auth import policy
  File "/usr/lib/python2.7/dist-packages/openstack_auth/policy.py", line 24, in <module>
    from openstack_auth import user as auth_user
  File "/usr/lib/python2.7/dist-packages/openstack_auth/user.py", line 18, in <module>
    from django.contrib.auth import models
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/models.py", line 4, in <module>
    from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/auth/base_user.py", line 49, in <module>
    class AbstractBaseUser(models.Model):
  File "/usr/local/lib/python2.7/dist-packages/django/db/models/base.py", line 94, in __new__
    app_config = apps.get_containing_app_config(module)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 239, in get_containing_app_config
    self.check_apps_ready()
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 124, in check_apps_ready
    raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
dpkg: error processing package openstack-dashboard-ubuntu-theme (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 openstack-dashboard-ubuntu-theme
E: Sub-process /usr/bin/dpkg returned an error code (1)

I also tried following commands to fix these issues.But it didn't worked

我也尝试了以下命令来解决这些问题。但它没有奏效

apt-get remove --auto-remove openstack-dashboard-ubuntu-theme

Thanks in advance

提前致谢

1 个解决方案

#1


1  

I was able to discern in my case it was an issue to do with apache not restarting due to a missing module namely : wsgi

我能够在我的情况下辨别出由于缺少模块而导致apache无法重启的问题,即:wsgi

I installed it :

我安装了它:

apt-get install libapache2-mod-wsgi

The activated it :

激活了它:

sudo a2enmod wsgi
sudo /etc/init.d/apache2 reload

or

要么

service apache2 restart

The I was able to uninstall the openstack-dashboard-ubuntu-theme:

我能够卸载openstack-dashboard-ubuntu-theme:

dpkg --remove --force-remove-reinstreq openstack-dashboard-ubuntu-theme

Hope it helps.

希望能帮助到你。

#1


1  

I was able to discern in my case it was an issue to do with apache not restarting due to a missing module namely : wsgi

我能够在我的情况下辨别出由于缺少模块而导致apache无法重启的问题,即:wsgi

I installed it :

我安装了它:

apt-get install libapache2-mod-wsgi

The activated it :

激活了它:

sudo a2enmod wsgi
sudo /etc/init.d/apache2 reload

or

要么

service apache2 restart

The I was able to uninstall the openstack-dashboard-ubuntu-theme:

我能够卸载openstack-dashboard-ubuntu-theme:

dpkg --remove --force-remove-reinstreq openstack-dashboard-ubuntu-theme

Hope it helps.

希望能帮助到你。