Mongodb installation on Docker - mongodb

I've been trying for a while now to install mongodb on my docker image in a variety of ways. I've tried using the official image by calling 'docker pull mongo:latest' but for some reason the terminal just hangs with no feedback from docker. I've also tried various ways to build it through Dockerfile but run into an issue when trying to configure mongodb-org-server.
What is the correct way to install mongodb on my docker image? The easiest, I would presume, is to use the docker image for mongo but that's just freezing.
Dockerfile
FROM ubuntu:12.04
FROM ruby:2.2.0
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN echo "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list
RUN apt-get update -qq
RUN apt-get upgrade -y
RUN apt-get install -y build-essential libpq-dev nodejs mongodb-org tcl8.5
# Install redis
RUN wget http://download.redis.io/releases/redis-stable.tar.gz
RUN tar xzf redis-stable.tar.gz
WORKDIR redis-stable
RUN make
RUN make install
WORKDIR utils
RUN ./install_server.sh
RUN service redis_6379 start
RUN mkdir /myapp
WORKDIR /myapp
ADD . /myapp
RUN mv redis.conf /etc/redis/redis.conf.default
RUN redis-server &
#RUN bundle install
#RUN RAILS_ENV=development bundle exec rake assets:precompile --trace
RUN service mongod status
#RUN rake db:mongoid:create_indexes
CMD ["rails", "server", "-b", "0.0.0.0"]
ERROR
Step 6 : RUN apt-get install -y build-essential libpq-dev nodejs mongodb-org tcl8.5
---> Running in bc29e517b3a9
Reading package lists...
Building dependency tree...
Reading state information...
build-essential is already the newest version.
libpq-dev is already the newest version.
The following package was automatically installed and is no longer required:
libbison-dev
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
libc-ares2 libtcl8.5 libv8-3.14.5 mongodb-org-mongos mongodb-org-server
mongodb-org-shell mongodb-org-tools
Suggested packages:
tcl-tclreadline
The following NEW packages will be installed:
libc-ares2 libtcl8.5 libv8-3.14.5 mongodb-org mongodb-org-mongos
mongodb-org-server mongodb-org-shell mongodb-org-tools nodejs tcl8.5
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 53.6 MB of archives.
After this operation, 168 MB of additional disk space will be used.
Get:1 http://repo.mongodb.org/apt/ubuntu/ precise/mongodb-org/3.0/multiverse mongodb-org-shell amd64 3.0.6 [4258 kB]
Get:2 http://http.debian.net/debian/ jessie/main libtcl8.5 amd64 8.5.17-1 [737 kB]
Get:3 http://repo.mongodb.org/apt/ubuntu/ precise/mongodb-org/3.0/multiverse mongodb-org-server amd64 3.0.6 [8632 kB]
Get:4 http://http.debian.net/debian/ jessie/main libc-ares2 amd64 1.10.0-2 [76.7 kB]
Get:5 http://http.debian.net/debian/ jessie/main nodejs amd64 0.10.29~dfsg-2 [648 kB]
Get:6 http://http.debian.net/debian/ jessie/main tcl8.5 amd64 8.5.17-1 [58.6 kB]
Get:7 http://http.debian.net/debian/ jessie/main libv8-3.14.5 amd64 3.14.5.8-8.1 [1269 kB]
Get:8 http://repo.mongodb.org/apt/ubuntu/ precise/mongodb-org/3.0/multiverse mongodb-org-mongos amd64 3.0.6 [4043 kB]
Get:9 http://repo.mongodb.org/apt/ubuntu/ precise/mongodb-org/3.0/multiverse mongodb-org-tools amd64 3.0.6 [33.8 MB]
Get:10 http://repo.mongodb.org/apt/ubuntu/ precise/mongodb-org/3.0/multiverse mongodb-org amd64 3.0.6 [3616 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 53.6 MB in 11s (4850 kB/s)
Selecting previously unselected package libtcl8.5:amd64.
(Reading database ... 27887 files and directories currently installed.)
Preparing to unpack .../libtcl8.5_8.5.17-1_amd64.deb ...
Unpacking libtcl8.5:amd64 (8.5.17-1) ...
Selecting previously unselected package libc-ares2:amd64.
Preparing to unpack .../libc-ares2_1.10.0-2_amd64.deb ...
Unpacking libc-ares2:amd64 (1.10.0-2) ...
Selecting previously unselected package libv8-3.14.5.
Preparing to unpack .../libv8-3.14.5_3.14.5.8-8.1_amd64.deb ...
Unpacking libv8-3.14.5 (3.14.5.8-8.1) ...
Selecting previously unselected package mongodb-org-shell.
Preparing to unpack .../mongodb-org-shell_3.0.6_amd64.deb ...
Unpacking mongodb-org-shell (3.0.6) ...
Selecting previously unselected package mongodb-org-server.
Preparing to unpack .../mongodb-org-server_3.0.6_amd64.deb ...
Unpacking mongodb-org-server (3.0.6) ...
Selecting previously unselected package mongodb-org-mongos.
Preparing to unpack .../mongodb-org-mongos_3.0.6_amd64.deb ...
Unpacking mongodb-org-mongos (3.0.6) ...
Selecting previously unselected package mongodb-org-tools.
Preparing to unpack .../mongodb-org-tools_3.0.6_amd64.deb ...
Unpacking mongodb-org-tools (3.0.6) ...
Selecting previously unselected package mongodb-org.
Preparing to unpack .../mongodb-org_3.0.6_amd64.deb ...
Unpacking mongodb-org (3.0.6) ...
Selecting previously unselected package tcl8.5.
Preparing to unpack .../tcl8.5_8.5.17-1_amd64.deb ...
Unpacking tcl8.5 (8.5.17-1) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_0.10.29~dfsg-2_amd64.deb ...
Unpacking nodejs (0.10.29~dfsg-2) ...
Processing triggers for systemd (215-17+deb8u2) ...
Setting up libtcl8.5:amd64 (8.5.17-1) ...
Setting up libc-ares2:amd64 (1.10.0-2) ...
Setting up libv8-3.14.5 (3.14.5.8-8.1) ...
Setting up mongodb-org-shell (3.0.6) ...
Setting up mongodb-org-server (3.0.6) ...
Adding system user `mongodb' (UID 105) ...
Adding new user `mongodb' (UID 105) with group `nogroup' ...
Not creating home directory `/home/mongodb'.
Adding group `mongodb' (GID 109) ...
Done.
Adding user `mongodb' to group `mongodb' ...
Adding user mongodb to group mongodb
Done.
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing package mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 100
Setting up mongodb-org-mongos (3.0.6) ...
Setting up mongodb-org-tools (3.0.6) ...
dpkg: dependency problems prevent configuration of mongodb-org:
mongodb-org depends on mongodb-org-server; however:
Package mongodb-org-server is not configured yet.
dpkg: error processing package mongodb-org (--configure):
dependency problems - leaving unconfigured
Setting up tcl8.5 (8.5.17-1) ...
Setting up nodejs (0.10.29~dfsg-2) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.19-18+deb8u1) ...
Errors were encountered while processing:
mongodb-org-server
mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
Service 'web' failed to build: The command '/bin/sh -c apt-get install -y build-essential libpq-dev nodejs mongodb-org tcl8.5' returned a non-zero code: 100

I think this is a duplicate of https://stackoverflow.com/a/16575040/880056
Summary: you're trying to install a new version of MongoDB which is packaged for Upstart init services, but the version of Ubuntu you're running still uses SysV init scripts.
Any reason you're using such an old Ubuntu version (12.04)?

Related

Can't install mongodb for ubuntu

Trying to install mongodb for ubuntu and can't solve the issue.
I got lost, need your help please!
Going according the docs:
https://www.mongodb.com/docs/master/tutorial/install-mongodb-on-ubuntu/
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
Result (CLI output): on mine ubuntu:
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
Result (CLI output):
deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse
sudo apt-get update
Result (CLI output):
et:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Ign:2 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 InRelease
Hit:3 http://packages.microsoft.com/repos/code stable InRelease
Hit:4 https://ppa.launchpadcontent.net/graphics-drivers/ppa/ubuntu jammy InRelease
Hit:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 Release
Ign:6 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 InRelease
Hit:7 http://il.archive.ubuntu.com/ubuntu jammy InRelease
Ign:8 https://ppa.launchpadcontent.net/upubuntu-com/xampp/ubuntu jammy InRelease
Hit:9 http://il.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:11 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 Release
Hit:12 http://il.archive.ubuntu.com/ubuntu jammy-backports InRelease
Err:13 https://ppa.launchpadcontent.net/upubuntu-com/xampp/ubuntu jammy Release
404 Not Found [IP: 185.125.190.52 443]
Reading package lists... Done
W: http://repo.mongodb.org/apt/ubuntu/dists/xenial/mongodb-org/4.0/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: The repository 'https://ppa.launchpadcontent.net/upubuntu-com/xampp/ubuntu jammy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/6.0/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
sudo apt-get install -y mongodb-org
Result (CLI output):
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mongodb-org-mongos : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
mongodb-org-server : Depends: libcurl3 (>= 7.16.2) but it is not installable
Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
mongodb-org-shell : Depends: libssl1.0.0 (>= 1.0.1) but it is not installable
mongodb-org-tools : Depends: libssl1.0.0 (>= 1.0.2~beta3) but it is not installable
E: Unable to correct problems, you have held broken packages.
uname -m
Result (CLI output):
x86_64
lsb_release -a
Result (CLI output):
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
Good evening, I was having the same problem which was basically the lack of libssl1.1
What I did to solve it was to add the repository that contains this lib to download, in this case I used the focal repository.
Use this command in your terminal to add it to your system:
echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
Then do an update:
sudo apt-get update
And finally install the library:
sudo apt install libssl1.1
After installed try to install mongodb again, if it worked I'm glad to have helped you, if the problem persists I don't know how I can help you :(

Error building custom Docker image with Postgres and security updates: "configuration file createcluster.conf is available"

I have a Dockerfile that builds an image based on postgres, but additionally installs security updates (this is to ensure that the image has the latest patches even if a release is slightly older).
This is the Dockerfile:
FROM postgres:14.2
# apply security updates
RUN \
apt-get update -qq && \
apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/*
ENV PGDATA /var/lib/postgresql/data
# switch to lower-privileged user
USER 999
CMD ["postgres", "-c", "listen_addresses=*", "-c", "config_file=/etc/postgresql/postgresql.conf"]
Now, this build broke:
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
The following packages will be upgraded:
libpq5 postgresql-14 postgresql-client-14 postgresql-client-common
postgresql-common
5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 17.9 MB of archives.
After this operation, 25.6 kB of additional disk space will be used.
Get:1 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 libpq5 amd64 14.3-1.pgdg110+1 [172 kB]
Get:2 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 postgresql-common all 241.pgdg110+1 [230 kB]
Get:3 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 postgresql-client-common all 241.pgdg110+1 [92.1 kB]
Get:4 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 postgresql-client-14 amd64 14.3-1.pgdg110+1 [1,629 kB]
Get:5 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg/main amd64 postgresql-14 amd64 14.3-1.pgdg110+1 [15.8 MB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 17.9 MB in 1s (25.4 MB/s)
(Reading database ... 12100 files and directories currently installed.)
Preparing to unpack .../libpq5_14.3-1.pgdg110+1_amd64.deb ...
Unpacking libpq5:amd64 (14.3-1.pgdg110+1) over (14.2-1.pgdg110+1) ...
Preparing to unpack .../postgresql-common_241.pgdg110+1_all.deb ...
Leaving 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Unpacking postgresql-common (241.pgdg110+1) over (238.pgdg110+1) ...
Preparing to unpack .../postgresql-client-common_241.pgdg110+1_all.deb ...
Unpacking postgresql-client-common (241.pgdg110+1) over (238.pgdg110+1) ...
Preparing to unpack .../postgresql-client-14_14.3-1.pgdg110+1_amd64.deb ...
Unpacking postgresql-client-14 (14.3-1.pgdg110+1) over (14.2-1.pgdg110+1) ...
Preparing to unpack .../postgresql-14_14.3-1.pgdg110+1_amd64.deb ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
Unpacking postgresql-14 (14.3-1.pgdg110+1) over (14.2-1.pgdg110+1) ...
Setting up postgresql-client-common (241.pgdg110+1) ...
Setting up libpq5:amd64 (14.3-1.pgdg110+1) ...
Setting up postgresql-client-14 (14.3-1.pgdg110+1) ...
Setting up postgresql-common (241.pgdg110+1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Configuring postgresql-common
-----------------------------
createcluster.conf: A new version (/tmp/postgresql-common.sK2jGD) of
configuration file /etc/postgresql-common/createcluster.conf is available, but
the version installed currently has been locally modified.
1. install the package maintainer's version
2. keep the local version currently installed
3. show the differences between the versions
4. show a side-by-side difference between the versions
5. start a new shell to examine the situation
What do you want to do about modified configuration file createcluster.conf?
How can I solve this problem?
The build breaks because it asks you what to do, and from a script (or automated build), this is not possible.
The solution is to allow apt to configure the installation noninteractively. Add to your Dockerfile:
ENV DEBIAN_FRONTEND=noninteractive
This way, automatic selections to the packages will apply. This is fine for most cases.

mongoDB in Ubuntu 20.04 Problems

so i installed mongodb in a wrong way , like watched a video of it in youtube even if "mongo" command is working that doesn't mean its really working
so i'm trying to uninstall mongodb-org but i got this error :
sudo apt remove mongodb-org
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-tools : Depends: mongodb-database-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
when i tried sudo 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-program-options1.71.0 libgoogle-perftools4 libpcrecpp0v5 libtcmalloc-minimal4 libyaml-cpp0.6 mongo-tools mongodb-server-core
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
mongodb-database-tools mongodb-org-mongos mongodb-org-server
The following NEW packages will be installed:
mongodb-database-tools mongodb-org-mongos mongodb-org-server
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 90.4 MB of archives.
After this operation, 146 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4/multiverse amd64 mongodb-org-server amd64 4.4.1 [20.3 MB]
8% [1 mongodb-org-server 8,584 kB/20.3 MB 42%] Get:2 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4/multiverse amd64 mongodb-org-mongos amd64 4.4.1 [15.7 MB]
Get:3 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4/multiverse amd64 mongodb-database-tools amd64 100.1.1 [54.4 MB]
Fetched 90.4 MB in 1min 11s (1,266 kB/s)
(Reading database ... 215423 files and directories currently installed.)
Preparing to unpack .../mongodb-org-server_4.4.1_amd64.deb ...
Unpacking mongodb-org-server (4.4.1) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-server_4.4.1_amd64.deb (--unpack):
trying to overwrite '/usr/bin/mongod', which is also in package mongodb-server-core 1:3.6.9+really3.
6.8+90~g8e540c0b6d-0ubuntu5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-org-mongos_4.4.1_amd64.deb ...
Unpacking mongodb-org-mongos (4.4.1) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-mongos_4.4.1_amd64.deb (--unpack):
trying to overwrite '/usr/bin/mongos', which is also in package mongodb-server-core 1:3.6.9+really3.
6.8+90~g8e540c0b6d-0ubuntu5
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../mongodb-database-tools_100.1.1_amd64.deb ...
Unpacking mongodb-database-tools (100.1.1) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-database-tools_100.1.1_amd64.deb (--un
pack):
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-server_4.4.1_amd64.deb
/var/cache/apt/archives/mongodb-org-mongos_4.4.1_amd64.deb
/var/cache/apt/archives/mongodb-database-tools_100.1.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
when trying this commands :
apt upgrade , autoclean,remove,purge
they give the same first error
i tried sudo apt clean , then sudo apt --fix-broken install the same problem happend and the same response
all i want is to remove it .
In general if you are removing a package and you get that error, and you don't want the other packages that are being kept that want additional dependencies, you can remove all packages in the same command:
sudo apt remove mongodb-org mongodb-org-tools
The problem is with program:
http://manpages.ubuntu.com/manpages/focal/man1/bsondump.1.html
that is installed in package: mongo-tools from mongo v3
You can try:
sudo apt remove mongo-tools
In docs you can read that in mongo v4 this package has name mongodb-database-tools
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

Cannot install MongoDB on Beaglebone Green

The installation of MongoDB is still unsuccessful on the BeagleBone Green card.
More information about this BBG:
debian#beaglebone:/var/lib/cloud9$ uname -a
Linux beaglebone 4.9.82-ti-r102 #1 SMP PREEMPT Thu Feb 22 01:16:12 UTC 2018 armv7l GNU/Linux
debian#beaglebone:/var/lib/cloud9$ cat /etc/*-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Even I tried to follow this tutorial : https://docs.mongodb.com/v3.0/tutorial/install-mongodb-on-debian/ as below :
debian#beaglebone:/var/lib/cloud9$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
Executing: /tmp/apt-key-gpghome.jgT79mhjhQ/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
gpg: key 58712A2291FA4AD5: "MongoDB 3.6 Release Signing Key <packaging#mongodb.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
debian#beaglebone:/var/lib/cloud9$ echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 main
debian#beaglebone:/var/lib/cloud9$ echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/{+package-branch+} main" | sudo tee /etc/apt/sources.list.d/mongodb-org-{+version+}.list
deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/{+package-branch+} main
debian#beaglebone:/var/lib/cloud9$ sudo apt-get update
Ign:1 http://deb.debian.org/debian stretch InRelease
Hit:2 http://deb.debian.org/debian stretch-updates InRelease
Get:3 http://deb.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:4 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 InRelease
Hit:5 http://repos.rcn-ee.com/debian stretch InRelease
Hit:6 http://deb.debian.org/debian stretch Release
Get:7 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 Release [2393 B]
Get:8 http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 Release.gpg [801 B]
Fetched 97.5 kB in 5s (17.8 kB/s)
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.6 InRelease' doesn't support architecture 'armhf'
debian#beaglebone:/var/lib/cloud9$ sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org
debian#beaglebone:/var/lib/cloud9$ sudo apt-get install -y mongodb-org=3.6.4 mongodb-org-server=3.6.4 mongodb-org-shell=3.6.4 mongodb-org-mongos=3.6.4 mongodb-org-tools=3.6.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org
E: Unable to locate package mongodb-org-server
E: Unable to locate package mongodb-org-shell
E: Unable to locate package mongodb-org-mongos
E: Unable to locate package mongodb-org-tools
debian#beaglebone:/var/lib/cloud9$ echo "mongodb-org hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian#beaglebone:/var/lib/cloud9$ echo "mongodb-org-server hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-server
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian#beaglebone:/var/lib/cloud9$ echo "mongodb-org-shell hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-shell
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian#beaglebone:/var/lib/cloud9$ echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-mongos
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
debian#beaglebone:/var/lib/cloud9$ echo "mongodb-org-tools hold" | sudo dpkg --set-selections
dpkg: warning: package not in status nor available database at line 1: mongodb-org-tools
dpkg: warning: found unknown packages; this might mean the available database
is outdated, and needs to be updated through a frontend method;
please see the FAQ <https://wiki.debian.org/Teams/Dpkg/FAQ>
but the problem is still the same.
How can I fix this issue please?
There is no ARMv7-HF package offered by that repository.
The easiest option is to go with the Debian package:
sudo apt install mongodb
This will yield version 3.2.11 as indicated here: https://packages.debian.org/stretch/mongodb
The more complicated option is to build it from source. This will potentially take a very long time if you do it directly on the BBB!
A rough guess at steps would be:
This pulls in build dependencies for the debian mongodb, which may be sufficient, but at least should provide a decent base:
sudo apt build-dep mongo
Download source code - as of the time of me writing this it would be:
wget https://fastdl.mongodb.org/src/mongodb-src-r3.6.5.tar.gz
Unpack: tar -xvzf mongodb-src-r3.6.5.tar.gz
Change directory into source: cd mongodb-src-r3.6.5
Build debian package from source: dpkg-buildpackage -b
Install build results: dpkg -i ../mongodb-org-bla-foo.deb
The build step might possibly fail for a variety of reasons, e.g. unresolved dependencies. Please make sure to download the latest version to avoid exposing yourself to security issues and stability problems, the above mentioned URL is just an example and only valid at the time of writing.

mongodb installation - error - chown: invalid group: ‘mongodb:mongodb’

I'm trying to install mongodb on ubuntu 14.10 following instructions from mongodb manual here . However I get the error chown: invalid group: ‘mongodb:mongodb’ and not able to proceed further with this.
> sudo apt-get install -y mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell
mongodb-org-tools
0 upgraded, 5 newly installed, 0 to remove and 56 not upgraded.
..................................
..................................
Setting up mongodb-org-shell (3.4.2) ...
Setting up mongodb-org-server (3.4.2) ...
chown: invalid group: ‘mongodb:mongodb’
dpkg: error processing package mongodb-org-server (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up mongodb-org-mongos (3.4.2) ...
Setting up mongodb-org-tools (3.4.2) ...
dpkg: dependency problems prevent configuration of mongodb-org:
mongodb-org depends on mongodb-org-server; however:
Package mongodb-org-server is not configured yet.
dpkg: error processing package mongodb-org (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mongodb-org-server
mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
>
Follow this commands, I hope, This will help you.
sudo userdel -r mongodb
sudo groupdel mongodb
sudo adduser mongodb
sudo groupadd mongodb
useradd -G mongodb mongodb