Answer the question
In order to leave comments, you need to log in
How to fix the error, does not see the mongo extension?
Dockerfile
RUN apt-get update && apt-get install -y php7.2-dev \
libphp7.2-embed \
php7.2-pgsql \
php7.2-mysqlnd \
php7.2-mbstring \
php7.2-bcmath \
php7.2-zip \
php7.2-curl \
php7.2-memcached \
php7.2-simplexml \
php7.2-imap \
php7.2-mongodb \
procps
Получаю вот такую ошибку
Your requirements could not be resolved to an installable set of packages.
Problem 1
- mongodb/mongodb 1.4.2 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb is missing from your system.
- mongodb/mongodb 1.4.2 requires ext-mongodb ^1.5.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for mongodb/mongodb 1.4.2 -> satisfiable by mongodb/mongodb[1.4.2].
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.2/cli/php.ini
- /etc/php/7.2/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.2/cli/conf.d/10-opcache.ini
- /etc/php/7.2/cli/conf.d/10-pdo.ini
- /etc/php/7.2/cli/conf.d/15-xml.ini
- /etc/php/7.2/cli/conf.d/20-bcmath.ini
- /etc/php/7.2/cli/conf.d/20-calendar.ini
- /etc/php/7.2/cli/conf.d/20-ctype.ini
- /etc/php/7.2/cli/conf.d/20-curl.ini
- /etc/php/7.2/cli/conf.d/20-dom.ini
- /etc/php/7.2/cli/conf.d/20-exif.ini
- /etc/php/7.2/cli/conf.d/20-fileinfo.ini
- /etc/php/7.2/cli/conf.d/20-ftp.ini
- /etc/php/7.2/cli/conf.d/20-gettext.ini
- /etc/php/7.2/cli/conf.d/20-iconv.ini
- /etc/php/7.2/cli/conf.d/20-igbinary.ini
- /etc/php/7.2/cli/conf.d/20-imap.ini
- /etc/php/7.2/cli/conf.d/20-json.ini
- /etc/php/7.2/cli/conf.d/20-mbstring.ini
- /etc/php/7.2/cli/conf.d/20-msgpack.ini
- /etc/php/7.2/cli/conf.d/20-mysqli.ini
- /etc/php/7.2/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.2/cli/conf.d/20-pdo_pgsql.ini
- /etc/php/7.2/cli/conf.d/20-pgsql.ini
- /etc/php/7.2/cli/conf.d/20-phar.ini
- /etc/php/7.2/cli/conf.d/20-posix.ini
- /etc/php/7.2/cli/conf.d/20-readline.ini
- /etc/php/7.2/cli/conf.d/20-shmop.ini
- /etc/php/7.2/cli/conf.d/20-simplexml.ini
- /etc/php/7.2/cli/conf.d/20-sockets.ini
- /etc/php/7.2/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.2/cli/conf.d/20-sysvsem.ini
- /etc/php/7.2/cli/conf.d/20-sysvshm.ini
- /etc/php/7.2/cli/conf.d/20-tokenizer.ini
- /etc/php/7.2/cli/conf.d/20-wddx.ini
- /etc/php/7.2/cli/conf.d/20-xmlreader.ini
- /etc/php/7.2/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.2/cli/conf.d/20-xsl.ini
- /etc/php/7.2/cli/conf.d/20-zip.ini
- /etc/php/7.2/cli/conf.d/25-memcached.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Answer the question
In order to leave comments, you need to log in
Here is the instruction for centos , did recently for a friend:
1.create a file /etc/yum.repos.d/mongodb-org.repo
[mongodb-org-3.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc
yum -y install http php mongodb-org
yum -y install gcc php-pear php-devel openssl-devel.i686 libxml2-devel openssl-devel
extension=mongo.so
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question