Как мне удалить emacs 25 и сохранить 26, когда apt находится в & ldquo; - fix-broken & rdquo; государство?

Я хотел бы полностью удалить emacs25 из моей системы и сохранить emacs26. К сожалению, я застрял в исправленном состоянии

Вот вывод ...

Попробуйте удалить emacs25

> $ sudo apt remove emacs25                                                                                                                                                            [±530-skurnik-depletions ✓]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 emacs : Depends: emacs25 or
                  emacs25-lucid but it is not going to be installed or
                  emacs25-nox but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

ОК, так что давайте попробуем исправить прерванная установка ...

> $ sudo apt --fix-broken install                                                                                                                                                      [±530-skurnik-depletions ✓]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  xaw3dg
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  emacs25-common
The following NEW packages will be installed:
  emacs25-common
0 upgraded, 1 newly installed, 0 to remove and 239 not upgraded.
13 not fully installed or removed.
Need to get 0 B/17.5 MB of archives.
After this operation, 70.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 261624 files and directories currently installed.)
Preparing to unpack .../emacs25-common_25.3~1.gite0284ab-kk1+18.04_all.deb ...
Unpacking emacs25-common (25.3~1.gite0284ab-kk1+18.04) ...
dpkg: error processing archive /var/cache/apt/archives/emacs25-common_25.3~1.gite0284ab-kk1+18.04_all.deb (--unpack):
 trying to overwrite '/usr/share/emacs/site-lisp/subdirs.el', which is also in package emacs26-common 26.1~1.git07f8f9b-kk1+18.04
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/emacs25-common_25.3~1.gite0284ab-kk1+18.04_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Как насчет того, чтобы заставить его? Тот же результат.

> $ sudo apt-get -f install                                                                                                                                                            [±530-skurnik-depletions ✓]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  xaw3dg
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  emacs25-common
The following NEW packages will be installed:
  emacs25-common
0 upgraded, 1 newly installed, 0 to remove and 239 not upgraded.
13 not fully installed or removed.
Need to get 0 B/17.5 MB of archives.
After this operation, 70.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 261624 files and directories currently installed.)
Preparing to unpack .../emacs25-common_25.3~1.gite0284ab-kk1+18.04_all.deb ...
Unpacking emacs25-common (25.3~1.gite0284ab-kk1+18.04) ...
dpkg: error processing archive /var/cache/apt/archives/emacs25-common_25.3~1.gite0284ab-kk1+18.04_all.deb (--unpack):
 trying to overwrite '/usr/share/emacs/site-lisp/subdirs.el', which is also in package emacs26-common 26.1~1.git07f8f9b-kk1+18.04
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/emacs25-common_25.3~1.gite0284ab-kk1+18.04_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

хорошо, давайте удалим!

> $ sudo apt-get purge emacs25                                                                                                                                                         [±530-skurnik-depletions ✓]
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 emacs : Depends: emacs25 or
                  emacs25-lucid but it is not going to be installed or
                  emacs25-nox but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
0
задан 2 July 2019 в 05:57

1 ответ

Я решил эту проблему, удалив все пакеты, зависящие от emacs, с помощью dpkg -r.

> $ sudo dpkg -r emacs                                                                                                                                                                 
dpkg: dependency problems prevent removal of emacs:
 elpa-flx depends on emacs.
 elpa-flx-ido depends on emacs; however:
  Package emacs is to be removed.
 elpa-epl depends on emacs.

dpkg: error processing package emacs (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 emacs

Итак, удалите elpa-flx ...

> $ sudo dpkg -r elpa-flx                                                                                                                                                              
dpkg: dependency problems prevent removal of elpa-flx:
 elpa-flx-ido depends on elpa-flx (= 0.6.1-1).

dpkg: error processing package elpa-flx (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 elpa-flx

> $ sudo dpkg -r elpa-flx-ido                                                                                                                                                          
(Reading database ... 261601 files and directories currently installed.)
Removing elpa-flx-ido (0.6.1-1) ...

> $ sudo dpkg -r elpa-flx                                                                                                                                                              
(Reading database ... 261593 files and directories currently installed.)
Removing elpa-flx (0.6.1-1) ...

> $ sudo dpkg -r emacs                                                                                                                                                                 
dpkg: dependency problems prevent removal of emacs:
 elpa-epl depends on emacs.

dpkg: error processing package emacs (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 emacs

> $ sudo dpkg -r elpa-epl                                                                                                                                                              
(Reading database ... 261582 files and directories currently installed.)
Removing elpa-epl (0.9-1) ...

> $ sudo dpkg -r emacs                                                                                                                                                                 
(Reading database ... 261571 files and directories currently installed.)
Removing emacs (47.0) ...
0
ответ дан 2 July 2019 в 05:57

Другие вопросы по тегам:

Похожие вопросы: