E
E
EVOSandru62018-10-12 11:33:59
MongoDB
EVOSandru6, 2018-10-12 11:33:59

Why is there an error when installing mongodb?

Have a good day,
I'm trying to do it on yii2:
composer install
I'm catching:
Problem 1
- Installation request for yiisoft/yii2-mongodb 2.1.7 -> satisfiable by yiisoft/yii2-mongodb[2.1.7].
- yiisoft/yii2-mongodb 2.1.7 requires ext-mongodb >=1.0.0 -> the requested PHP extension mongodb is missing from your system.

Trying to uninstall mongo and reinstall:

sudo service mongod stop 
sudo apt-get purge mongodb-org*

Removed mongodb-org-server (4.0.3) …
Failed to stop mongod.service: Unit mongod.service not loaded.
invoke-rc.d: initscript mongod, action "stop" failed.
dpkg: error processing package mongodb-org-server (--remove):
installed mongodb-org-server package pre-removal script subprocess returned error exit status 5
Errors occurred while processing the following packages:
mongodb-org-server
E: Sub- process /usr/bin/dpkg returned an error code (1)
Next installation:
sudo rm -r /var/log/mongodb /var/lib/mongodb
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4

### Для моей версии - Ubuntu 18.04 (Bionic)
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list

sudo apt-get update

sudo apt-get install -y mongodb-org

I tried to install another piece of packages:
sudo apt-get install -y mongodb-enterprise mongodb-enterprise-server mongodb-enterprise-shell mongodb-enterprise-mongos mongodb-enterprise-tools

Reading package lists... Done
Building dependency tree
Reading status information... Done
Package mongodb-enterprise is not available but is listed as a dependency list of another package.
This may mean that the package is missing, outdated, or available from sources not listed in sources.list
The mongodb-enterprise-mongos package is not available, but is listed in another package's dependency list.
This may mean that the package is missing, outdated, or available from sources not listed in sources.list
The mongodb-enterprise-server package is not available, but is listed in another package's dependency list.
This may mean that the package is missing, outdated, or available from sources not mentioned in sources.list
The mongodb-enterprise-shell package is not available, but is listed as a dependency of another package.
This may mean that the package is missing, outdated, or available from sources not listed in sources.list
The mongodb-enterprise-tools package is not available, but is listed in another package's dependency list.
This may mean that the package is missing, outdated, or available from sources not mentioned in sources.list
E: No installation candidate found for package 'mongodb-enterprise'
E: No installation candidate found for package 'mongodb-enterprise-server' installation
E: No installation candidate found for package 'mongodb-enterprise-shell'
E: No installation candidate found for package 'mongodb-enterprise-mongos'
E: No installation candidate found for package "mongodb-enterprise-tools"

Trying to run mongo:
$ mongod
2018-10-12T11:31:34.017+0300 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2018-10-12T11:31:34.027+0300 I CONTROL [initandlisten] MongoDB starting : pid=20286 port=27017 dbpath=/data/db 64-bit host=andrey-Lenovo-ideapad-310- 15ISK
2018-10-12T11: 31: 34.027 + 0300 CONTROL I [initandlisten] db version v4.0.3
2018-10-12T11: 31: 34.027 + 0300 CONTROL I [initandlisten] git version: 7ea530946fa7880364d88c8d8b6026bbc9ffa48c
2018-10-12T11: 31: 34.027+0300 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2n 7 Dec 2017
2018-10-12T11:31:34.027+0300 I CONTROL [initandlisten] allocator :
tcmalloc
CONTROL [initandlisten] build environment:
2018-10-12T11:31:34.027+0300 I CONTROL [initandlisten] distmod: ubuntu1404
2018-10-12T11:31:34.027+0300 I CONTROL [initandlisten] distarch: x86_64
2018-10-12T1 :31:34.027+0300 I CONTROL [initandlisten] target_arch: x86_64
2018-10-12T11:31:34.027+0300 I CONTROL [initandlisten] options: {}
2018-10-12T11:31:34.028+0300 I STORAGE [initandlisten] exception in initAndListen: NonExistentPath: Data directory /data/db not found., terminating
2018-10-12T11:31: 34.029 +0300 I NETWORK [initandlisten] shutdown: going to close listening sockets... -27017.sock
2018-10-12T11:31:34.029+0300 I CONTROL [initandlisten] now exiting
2018-10-12T11:31:34.029+0300 I CONTROL [initandlisten] shutting down with code:100

What is the reason? Achtung.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2018-10-12
@EVOSandru6

monga is not written in PHP, why is it a composer)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question