MongoDB installation issues

I am trying to install MongoDB on my hosted Linux box and getting this error.

I cannot seem to get it corrected after trying many different forum solutions.

Anyone have any thoughts?

My hosted system specs:
Operating system Debian Linux 8
Kernel and CPU Linux 3.16.0-5-amd64 on x86_64

 The following packages have unmet dependencies:
 mongodb-org : Depends: mongodb-org-server but it is not going to be installed
               Depends: mongodb-org-mongos but it is not going to be installed
               Depends: mongodb-org-tools but it is not going to be installed
 unifi : Depends: mongodb-server (>= 2.4.10) but it is not going to be installed or
                  mongodb-10gen (>= 2.4.14) but it is not installable or
                  mongodb-org-server (>= 2.6.0) but it is not going to be installed
         Depends: mongodb-server (< 1:3.6.0) but it is not going to be installed or
                  mongodb-10gen (< 3.6.0) but it is not installable or
                  mongodb-org-server (< 3.6.0) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Open in new window


T.I.A.!
LVL 32
nappy_dThere are a 1000 ways to skin the technology cat.Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Prabhin MPEngineer-TechOPSCommented:
apt --fix-broken install
check this
Rahul ShendeJr. Linux System AdministratorCommented:
apt --fix-broken install
may it help
Rahul ShendeJr. Linux System AdministratorCommented:
if it no help please share some more logs
Maximize Customer Retention with Superior Service

The IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more to help build customer satisfaction and retention.

nappy_dThere are a 1000 ways to skin the technology cat.Author Commented:
Let me try <apt--fix-broken install> again it didn't work as that was one of the fixes many forums mentioned.
Prabhin MPEngineer-TechOPSCommented:
or u can try with apt-get -f install, if in case the installation failed due to dependency issue.
nappy_dThere are a 1000 ways to skin the technology cat.Author Commented:
So far apt --fix-broken install gives these errors

root@UT01:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libboost-chrono1.62.0 libboost-program-options1.62.0 libboost-regex1.62.0
  libboost-thread1.62.0 libgoogle-perftools4 libicu-le-hb0 libicu60 libpcap0.8
  libpcrecpp0v5 libsnappy1v5 libstemmer0d libtcmalloc-minimal4 libunwind8
  libyaml-cpp0.5v5 mongo-tools mongodb-server-core
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  mongodb-org-mongos mongodb-org-server mongodb-org-tools
The following NEW packages will be installed:
  mongodb-org-mongos mongodb-org-server mongodb-org-tools
0 upgraded, 3 newly installed, 0 to remove and 591 not upgraded.
2 not fully installed or removed.
Need to get 0 B/46.2 MB of archives.
After this operation, 203 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 81962 files and directories currently installed.)
Preparing to unpack .../mongodb-org-server_4.0.0_amd64.deb ...
Unpacking mongodb-org-server (4.0.0) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-server_4.0.0_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongod', which is also in package mongodb-server-core 1:3.4.15-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-mongos_4.0.0_amd64.deb ...
Unpacking mongodb-org-mongos (4.0.0) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-mongos_4.0.0_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongos', which is also in package mongodb-server-core 1:3.4.15-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-tools_4.0.0_amd64.deb ...
Unpacking mongodb-org-tools (4.0.0) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_4.0.0_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.4.14-3
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mongodb-org-server_4.0.0_amd64.deb
 /var/cache/apt/archives/mongodb-org-mongos_4.0.0_amd64.deb
 /var/cache/apt/archives/mongodb-org-tools_4.0.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Open in new window


apt-get -f install produces these errors

root@UT01:~# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libboost-chrono1.62.0 libboost-program-options1.62.0 libboost-regex1.62.0
  libboost-thread1.62.0 libgoogle-perftools4 libicu-le-hb0 libicu60 libpcap0.8
  libpcrecpp0v5 libsnappy1v5 libstemmer0d libtcmalloc-minimal4 libunwind8
  libyaml-cpp0.5v5 mongo-tools mongodb-server-core
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  mongodb-org-mongos mongodb-org-server mongodb-org-tools
The following NEW packages will be installed:
  mongodb-org-mongos mongodb-org-server mongodb-org-tools
0 upgraded, 3 newly installed, 0 to remove and 591 not upgraded.
2 not fully installed or removed.
Need to get 0 B/46.2 MB of archives.
After this operation, 203 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 81962 files and directories currently installed.)
Preparing to unpack .../mongodb-org-server_4.0.0_amd64.deb ...
Unpacking mongodb-org-server (4.0.0) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-server_4.0.0_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongod', which is also in package mongodb-server-core 1:3.4.15-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-mongos_4.0.0_amd64.deb ...
Unpacking mongodb-org-mongos (4.0.0) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-mongos_4.0.0_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/mongos', which is also in package mongodb-server-core 1:3.4.15-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-tools_4.0.0_amd64.deb ...
Unpacking mongodb-org-tools (4.0.0) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_4.0.0_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.4.14-3
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mongodb-org-server_4.0.0_amd64.deb
 /var/cache/apt/archives/mongodb-org-mongos_4.0.0_amd64.deb
 /var/cache/apt/archives/mongodb-org-tools_4.0.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Open in new window

Prabhin MPEngineer-TechOPSCommented:
hi,
do
dpkg -P mongodb-org
sudo apt-get install -f
If it's shows any dependency problem when uninstalling the above mogodb-org  package, then purge  mogodb-org  package along with it's dependencies.

sudo apt-get purge mogodb*
Before running the above command, don't forget to check the dependency packages which are going to be purged along with mongodb.

sudo apt-get purge -s mongodb*

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.