2

I recently installed mongodb on my ubuntu 18.04. After that when i try installing any package using apt, I get this error.

$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).

i try using apt --fix-broken install. It tries installing mongodb-org-tools but just after unpacking , dpkg returns this:

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)

How can I fix this?

Edit : The commands suggestd by @N0rbert don't work for me. Here's the output to the commands he listed

$ 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 Answers1

0

Two problems here -

  1. you have missed universe pocket. Enable it with:

    sudo add-apt-repository universe
    

    Fix your repositories as described in this answer if unsure.

  2. you have two sources for MongoDB package, remove older one with

    sudo apt-get remove mongo-tools
    

And finally install Shutter with

sudo apt-get install shutter
N0rbert
  • 99,918
  • Apologies but this doesn't work for me , the universe pcoket was already enabled and using apt-get remove mongo-tools didn't work either. updated the output of both in the question – Ash Klempton Aug 21 '19 at 13:10