Por que estou recebendo o erro “Subprocesso / usr / bin / dpkg retornou um código de erro (1)” (relacionado ao openstack-dashboard)?

0

Sempre que tento usar sudo apt-get update e, em seguida, sudo apt-get upgrade , sempre recebo um erro relacionado a openstack-dashboard .

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  openstack-dashboard-ubuntu-theme
The following packages will be upgraded:
  heroku
1 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/14.0 MB of archives.
After this operation, 190 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 413428 files and directories currently installed.)
Removing openstack-dashboard-ubuntu-theme (2:9.1.2-0ubuntu3) ...
Collecting and compressing static assets...
Traceback (most recent call last):
  File "manage.py", line 18, in <module>
    from django.core.management import execute_from_command_line  # noqa
ImportError: No module named django.core.management
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)
    
por ABHI KHANDELWAL 18.02.2018 / 20:35

1 resposta

0

Você receberá este erro sempre que atualizar ou instalar um novo pacote, pois o pacote openstack-dashboard-ubuntu-theme está corrompido em seu sistema. Solução para isso:

sudo rm /var/lib/dpkg/info/openstack-dashboard-ubuntu-theme.*

Verifique se o seu problema está resolvido, se não, execute este comando depois.

sudo apt remove --purge openstack-dashboard-ubuntu-theme
sudo apt -f install
sudo apt update
    
por Sanjay Prajapat 18.02.2018 / 21:29