Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

issue under docker #2244

Answered by GautierDele
angryalf asked this question in Q&A
Discussion options

  • Laravel-mongodb Version: #.#.#
  • PHP Version: 7.4.16
  • Database Driver & Version:

Description:

I have issue under Docker

docker-compose run composer update
Creating site-generator_composer_run ... done
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- jenssegers/mongodb[v3.8.0, ..., v3.8.3] require mongodb/mongodb ^1.6 -> satisfiable by mongodb/mongodb[1.6.0, ..., 1.9.x-dev (alias of dev-master)].
- mongodb/mongodb 1.9.x-dev is an alias of mongodb/mongodb dev-master and thus requires it to be installed too.
- mongodb/mongodb dev-master requires ext-mongodb ^1.10.0 -> it is missing from your system. Install or enable PHP's mongodb extension.
- mongodb/mongodb[1.6.0, ..., v1.6.x-dev] require php ^5.6 || ^7.0 -> your php version (8.0.3) does not satisfy that requirement.
- mongodb/mongodb[1.7.0-beta1, ..., v1.7.x-dev] require php ^7.0 -> your php version (8.0.3) does not satisfy that requirement.
- mongodb/mongodb[1.8.0-RC1, ..., v1.8.x-dev] require ext-mongodb ^1.8.1 -> it is missing from your system. Install or enable PHP's mongodb extension.
- Root composer.json requires jenssegers/mongodb ^3.8 -> satisfiable by jenssegers/mongodb[v3.8.0, v3.8.1, v3.8.2, v3.8.3].

To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/php-cli.ini
- /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
- /usr/local/etc/php/conf.d/docker-php-ext-zip.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

docker-compose run php -m
Creating site-generator_php_run ... done
[PHP Modules]
cgi-fcgi
Core
ctype
curl
date
dom
fileinfo
filter
ftp
hash
iconv
json
libxml
mbstring
mongodb
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
redis
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xdebug
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]
Xdebug

You must be logged in to vote

This issue is not related to the package but:

You can add this to your dockerfile:

 # Install the mongodb extension
 if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
 pecl install mongo && \
 docker-php-ext-enable mongo \
 ;else \
 pecl install mongodb && \
 docker-php-ext-enable mongodb \
 ;fi \

Replies: 1 comment

Comment options

This issue is not related to the package but:

You can add this to your dockerfile:

 # Install the mongodb extension
 if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
 pecl install mongo && \
 docker-php-ext-enable mongo \
 ;else \
 pecl install mongodb && \
 docker-php-ext-enable mongodb \
 ;fi \
You must be logged in to vote
0 replies
Answer selected by divine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
Converted from issue

This discussion was converted from issue #2224 on April 30, 2021 09:59.

AltStyle によって変換されたページ (->オリジナル) /