I am getting the following error trying to install the MongoDB tools on my Pop!_OS machine:
mongodb-org-tools : Depends: libssl1.0.0 (>= 1.0.2~beta3) but it is not installable
Any suggestions?
Commands I Used
wget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org-tools
Verification of Pop version:
$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="20.04 LTS"
What I Tried
Using a backports solution (see here)
Instruction Set 1 here
Instruction Set 2 here
Hi,You are using a list file for MongoDB to Ubuntu 16.04(Xenial).
Try to use the list for Ubuntu 20.04 (Focal):
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
font: MongoDB Community
Related
Specs: Ubuntu 18.04 Nginx server, Vestacp control panel.
MongoDB was pre-installed in my server, in 3.6.3 version. It was working but I wanted to upgrade it to version 4.4 (current release).
The problem now is that I can't start the mongo service (community edition).
Steps I followed so far:
Stop MongoDB service, Remove packages and remove Data Directories.
sudo service mongod stop
sudo apt-get purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
Trying to install the new version 4.4 the exact steps from the documentation. Below are the commands with an order:
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
sudo apt-get install gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
echo "mongodb-org hold" | sudo dpkg --set-selections
echo "mongodb-org-server hold" | sudo dpkg --set-selections
echo "mongodb-org-shell hold" | sudo dpkg --set-selections
echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
echo "mongodb-org-tools hold" | sudo dpkg --set-selections
ps --no-headers -o comm 1
sudo systemctl start mongod
sudo systemctl daemon-reload
sudo systemctl enable mongod
mongo
Errors:
sudo apt-get update
It throws an error:
Skipping acquire of configured file 'nginx/binary-i386/Packages' as repository 'http://nginx.org/packages/mainline/ubuntu bionic InRelease' doesn't support architecture 'i386'
On the step:
sudo apt-get install -y mongodb-org
E: Sub-process /usr/bin/dpkg returned an error code (1)
On the step:
sudo systemctl start mongod
Failed to start mongod.service: Unit mongod.service not found.
Directories:
/var/lib/mongodb
and
/var/log/mongodb
are not auto-created after the installation and I can't find them on the above paths.
The port I am trying to begin the server is the default 27017 and I set the rules to ufw.
I am tried to find a solution from similar posts but nothing. I'm stuck for two days now.
Any thought or help?
The problem was in uninstallation of previous MongoDB version 3.6.3.
The command in terminal...
sudo apt-get purge mongodb-org*
...Doesn't uninstall all the packages correctly.
The correct uninstallation was to type in the command line:
sudo apt list --installed | grep mongo
...In order to see if there are any packages left from MongoDB. I had 2 packages left that "purge mongodb-org*" couldn't delete.
So the correct removing executions are the below:
sudo apt remove mongodb
sudo apt purge mongodb
sudo apt autoremove
After that, the installation of the new MongoDB version 4.4 was successfully completed without errors!
So the things I have tried are:
1)
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
2)
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.4 multiverse
3)
sudo apt-get update
4)
sudo apt-get install -y mongodb-org=3.4.10 mongodb-org-server=3.4.10 mongodb-org-shell=3.4.10 mongodb-org-mongos=3.4.10 mongodb-org-tools=3.4.10
But I got this error:
E: Version '3.4.10' for 'mongodb-org' was not found
E: Version '3.4.10' for 'mongodb-org-server' was not found
E: Version '3.4.10' for 'mongodb-org-shell' was not found
E: Version '3.4.10' for 'mongodb-org-mongos' was not found
E: Version '3.4.10' for 'mongodb-org-tools' was not found
I have read the other article about this, but it did not work for me and I don't want to use a docker image.
ok so the things to do to install this version are
Step 1
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
Step 2
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
Step 3
sudo apt update
Step 4
sudo apt-get install -y mongodb-org=3.4.17 mongodb-org-server=3.4.17 mongodb-org-shell=3.4.17 mongodb-org-mongos=3.4.17 mongodb-org-tools=3.4.17
here is the really helpful source: https://askubuntu.com/questions/1089312/install-and-use-mongodb-3-4-17-on-ubuntu-18-04
I updated with this commands from MongoDB 3.2 to 3.4:
https://medium.com/mongoaudit/how-to-upgrade-mongodb-to-latest-stable- version-9607266834cf:
sudo rm /etc/apt/sources.list.d/mongodb*.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo apt-get install -y mongodb-org shows this lines:
root#accounting:/home/accounting# sudo apt-get install -y mongodb-org
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
»mongodb-org« ist bereits die neuste Version (3.4.17).
Afterwards I started mongo and the following lines are shown:
root#accounting:/home/accounting# mongo
MongoDB shell version: 3.2.17
How can I update MongoDB shell version to 3.4.17?
[SOLVED]
sudo service mongod stop
sudo apt-get purge mongodb-org*
mongod --shutdown
I am having troubles installing mongoDB in codeanywhere. It generally shows..
cabox#box-codeanywhere:~/workspace$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.i9L1IwAn0P --no-auto-check-trustdb --trust-model always --keyring /etc/apt/
trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
gpg: requesting key 91FA4AD5 from hkp server keyserver.ubuntu.com
gpg: key 91FA4AD5: "MongoDB 3.6 Release Signing Key <packaging#mongodb.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
cabox#box-codeanywhere:~/workspace$ echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d
/mongodb-org-3.6.list
deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse
cabox#box-codeanywhere:~/workspace$ sudo apt-get update
E: The method driver /usr/lib/apt/methods/https could not be found.
N: Is the package apt-transport-https installed?
cabox#box-codeanywhere:~/workspace$ sudo apt-get install -y mongodb-org
Reading package lists... 1%
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org
help me please
I had the same issue, the main problem is that the repo uses https, hence Is the package apt-transport-https installed?
Try installing apt-transport-https before adding any https repos and see if that helps.
I did this by simply destroying my container, creating a new one (Node.js on Ubuntu), running sudo apt-get install apt-transport-https, then sudo apt-get update and then doing the instructions on this page as you were attempting to do so
I use a mongodb database, I am on macOS, the command mongoexport does not pass, I am under the /bin directory of the database
here is my command
mongoexport --db Battleship --collection user --out resultExport.json
my database is Battleship , and the collection is user
any idea \?
If mongoexport is in the same directory that your current one (and also is executable and you got perms to execute it) then you need to prepend executable with ./ and invoke it that way:
./mongoexport --db Battleship --collection user --out resultExport.json
Here's more on why you need that for https://askubuntu.com/a/320657/649099
If there is a warning mongoexport command not found, you have to install
mongodb-org-tools
For centos users
yum install mongodb-org-tools
For Ubuntu:
Import the public key used by the package management system.
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
Create a list file for MongoDB
Ubuntu 18.04:
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
Ubuntu 20.04:
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
Reload local package database.
sudo apt-get update
Install the MongoDB packages.
sudo apt-get install -y mongodb-org