Невозможно исправить неудовлетворенные зависимости с помощью apt --fix-broken install

Я недавно установил mongodb на свою Ubuntu 18.04. После этого, когда я пытаюсь установить любой пакет с помощью apt, я получаю эту ошибку.

$sudo apt-get install shutter
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:
mongodb-org : Depends: mongodb-org-tools but it is not going to be installed
shutter : Depends: libgtk2-perl but it is not going to be installed
       Depends: libgnome2-perl but it is not going to be installed
       Depends: libgnome2-vfs-perl but it is not going to be installed
       Depends: libgnome2-wnck-perl but it is not going to be installed
       Depends: libgnome2-gconf-perl but it is not going to be installed
       Depends: libwww-mechanize-perl but it is not going to be installed
       Depends: libimage-magick-perl but it is not going to be installed
       Depends: libproc-simple-perl but it is not going to be installed
       Depends: libfile-which-perl but it is not going to be installed
       Depends: libsort-naturally-perl but it is not going to be installed
       Depends: libgtk2-imageview-perl but it is not going to be installed
       Depends: libgnome2-canvas-perl but it is not going to be installed
       Depends: libgtk2-unique-perl but it is not going to be installed
       Depends: libproc-processtable-perl but it is not going to be installed
       Depends: libpath-class-perl but it is not going to be installed
       Depends: libjson-perl but it is not going to be installed
       Depends: libjson-xs-perl but it is not going to be installed
       Depends: libnet-dropbox-api-perl but it is not going to be installed
       Depends: libx11-protocol-other-perl but it is not going to be installed
       Recommends: libgoo-canvas-perl but it is not installable
       Recommends: libgtk2-appindicator-perl but it is not installable
       Recommends: libnet-oauth-perl but it is not going to be installed
 E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Я пытаюсь использовать apt --fix-broken install. Он пытается установить mongodb-org-tools, но сразу после распаковки dpkg возвращает это:

Preparing to unpack .../mongodb-org-tools_4.2.0_amd64.deb ...
Unpacking mongodb-org-tools (4.2.0) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_4.2.0_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mongodb-org-tools_4.2.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Как я могу это исправить?

Редактировать: команды, предложенные @ N0rbert, не работают для меня , Вот вывод команд, которые он перечислил

$ sudo add-apt-repository universe
'universe' distribution component is already enabled for all sources.
$ sudo apt-get remove mongo-tools
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:
 mongodb-org : Depends: mongodb-org-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
1
задан 21 August 2019 в 16:17

1 ответ

Две проблемы здесь -

  1. Вы пропустили карман вселенной. Включите его с:

    sudo add-apt-repository universe
    

    Зафиксируйте свои репозитории, как описано в этом ответе, если не уверенный.

  2. Вы имеете два источника для пакета MongoDB, удаляете более старый с

    sudo apt-get remove mongo-tools
    

И наконец Затвор установки с

sudo apt-get install shutter
0
ответ дан 7 December 2019 в 19:06

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

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