-1

I'm getting errors in my terminal every time I try to apt-get install something or update. I guess it has something to do with installing mongodb.

I'm new to Linux, and I followed this guide exactly on how to install it. I couldn't find a guide for 17.04 version so I did the 16.10, and now every time I try to apt-get something I get this error:

Reading package lists... Done
W: GPG error: http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0
Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9ECBEC467F0CEB10 W: The repository 'http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Plus I have an alert in my top bar:

an error occured please run package manager from the right-click menu or apt-get in a terminal to see what is wrong the error message was :

Error brokenCount > 0. this usually means that your installed packages have unmet dependencies.
Zanna
  • 70,465
Steve
  • 1

1 Answers1

1

Run this command:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

Then

sudo apt-add-repository 'deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse'

Then

sudo apt update

Arun
  • 2,001
  • 11
  • 24
  • Then run sudo apt -f install – Arun Jun 07 '17 at 19:19
  • Err:6 http://dl.google.com/linux/chrome/deb stable InRelease Could not resolve 'dl.google.com' Err:7 http://repository.spotify.com stable InRelease
    Could not resolve 'repository.spotify.com' Err:8 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease Could not resolve repo.mongodb.org http://repo.mongodb.org/apt/debian/dists/wheezy/mongodb-org/3.0/InRelease Could not resolve 'repo.mongodb.org' W: Failed to fetch http://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/3.4/InRelease Could not resolve 'repo.mongodb.org'
    – Steve Jun 07 '17 at 19:24
  • That's network problem :D – Arun Jun 07 '17 at 19:24
  • it's not , after running sudo apt -f install : Unpacking mongodb-org-tools (3.4.4) ... dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_3.4.4_amd64.deb (--unpack): trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.2.11-1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/mongodb-org-tools_3.4.4_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) – Steve Jun 07 '17 at 19:28
  • You should delete repo.mongodb.org/apt/debian/dists/wheezy/mongodb-org/3.0/… from your repository – Arun Jun 07 '17 at 19:33
  • how do i delete it ? – Steve Jun 07 '17 at 19:50
  • Go to settings and select software&updates, select 2nd tab , you'll see it there – Arun Jun 07 '17 at 20:01
  • still nothing worked after apt update i tried apt upgrade and i got 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 installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages or specify a solutioni tried doing the apt--fix i got this error dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_3.4.4_amd64.deb --unpack /var/cache/apt/archives/mongodb-org-tools_3.4.4_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1 – Steve Jun 07 '17 at 20:30
  • E: Sub-process /usr/bin/dpkg returned an error code (1) – Steve Jun 08 '17 at 00:31
  • run sudo apt purge mongo* and try again – Arun Jun 08 '17 at 06:15