I am using Ubuntu 18.04.
Then i did on my terminal, after the installation:
"mongod --version"
And the response was:
db version v4.2.0
git version: a4b751dcf51dd249c5865812b390cfd1c0129c30
OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
allocator: tcmalloc
modules: none
build environment:
distmod: ubuntu1804
distarch: x86_64
target_arch: x86_64
Then i tried to run the "mongo" command:
Command 'mongo' not found, but can be installed with:
sudo apt install mongodb-clients
...So i did:
sudo apt install mongodb-clients
(I saw after that this command uninstalled the mongodb server, which i had to install again)
When it finished, i tried again the "mongo" command. Response:
MongoDB shell version v3.6.3
connecting to: mongodb://127.0.0.1:27017
2019-10-07T10:09:59.055-0300 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2019-10-07T10:09:59.056-0300 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed
So i tried to start the mongoDB first with "sudo service mongod start". Response:
Failed to start mongod.service: Unit mongod.service not found.
(the mongo client uninstalled the server. So i installed again the server using the ".deb" file)
I just dont know what to do. I already tried to follow the documentation at the ubuntu installation section (https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/) and also did not worked. I just dont know what to do. I already uninstalled it and installed a couple of times.
I am very frustrated. Someone know how to properly install it or faced similar issues?
I tried the command "updatedb" and when completed, i tried:
which mongod
Response:
/usr/bin/mongod
The 'mongo' program was not supposed to be in the same dir that the "mongod"?
When i tried:
which mongo
I get nothing.
Can someone please help me?
mongodb
package is installed on the system, run sudo apt list --installed | grep mongodb
. You can use sudo apt remove mongodb
and sudo apt purge mongodb
to remove and purge the mongodb
package before attempting this procedure. --
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/dca376df-b739-44b6-b159-6b707c85e9e5%40googlegroups.com.