Upgrade mongodb to 6.0.3 on ubuntu 22.04 failed while setting php7.4-fpm

I try to undestand what kind of requirement is php-fpm for mongodb. I tried to upgrade mongodb to 6.0.3 (latest) on Ubuntu 22.04. Since the upgrade process failed on php-fpm I must specify that I replaced the php 8.0 which is default on Ubuntu 22.04 with php7.4-fpm. I have no standard php installed on the server, just php-fpm.

Can someone analize the following error and tell me what’s going on?

install mongodb --version 6.0.3 '<======================================================================================='
deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse
Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
  libssl1.1
Use 'apt autoremove' to remove it.
The following packages will be upgraded:
  mongodb-org mongodb-org-database mongodb-org-mongos mongodb-org-server
  mongodb-org-shell mongodb-org-tools
6 upgraded, 0 newly installed, 0 to remove and 169 not upgraded.
1 not fully installed or removed.
Need to get 53.3 MB of archives.
After this operation, 2,583 kB disk space will be freed.
Get:1 https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0/multiverse amd64 mongodb-org-shell amd64 6.0.3 [2,986 B]
Get:2 https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0/multiverse amd64 mongodb-org-server amd64 6.0.3 [31.2 MB]
Get:3 https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0/multiverse amd64 mongodb-org-mongos amd64 6.0.3 [22.1 MB]
Get:4 https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0/multiverse amd64 mongodb-org-database amd64 6.0.3 [3,424 B]
Get:5 https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0/multiverse amd64 mongodb-org-tools amd64 6.0.3 [2,768 B]
Get:6 https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0/multiverse amd64 mongodb-org amd64 6.0.3 [2,804 B]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 53.3 MB in 6s (9,359 kB/s)
(Reading database ... 112930 files and directories currently installed.)
Preparing to unpack .../0-mongodb-org-shell_6.0.3_amd64.deb ...
Unpacking mongodb-org-shell (6.0.3) over (5.0.10) ...
Preparing to unpack .../1-mongodb-org-server_6.0.3_amd64.deb ...
Unpacking mongodb-org-server (6.0.3) over (5.0.10) ...
Preparing to unpack .../2-mongodb-org-mongos_6.0.3_amd64.deb ...
Unpacking mongodb-org-mongos (6.0.3) over (5.0.10) ...
Preparing to unpack .../3-mongodb-org-database_6.0.3_amd64.deb ...
Unpacking mongodb-org-database (6.0.3) over (5.0.10) ...
Preparing to unpack .../4-mongodb-org-tools_6.0.3_amd64.deb ...
Unpacking mongodb-org-tools (6.0.3) over (5.0.10) ...
Preparing to unpack .../5-mongodb-org_6.0.3_amd64.deb ...
Unpacking mongodb-org (6.0.3) over (5.0.10) ...
Setting up php7.4-fpm (1:7.4.30-5+ubuntu22.04.1+deb.sury.org+1) ...

Configuration file '/etc/php/7.4/fpm/pool.d/www.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** www.conf (Y/I/N/O/D/Z) [default=N] ?
Configuration file '/etc/php/7.4/fpm/pool.d/www.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** www.conf (Y/I/N/O/D/Z) [default=N] ?
Configuration file '/etc/php/7.4/fpm/pool.d/www.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** www.conf (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package php7.4-fpm (--configure):
 end of file on stdin at conffile prompt
Setting up mongodb-org-server (6.0.3) ...
Installing new version of config file /etc/mongod.conf ...
Setting up mongodb-org-shell (6.0.3) ...
Setting up mongodb-org-tools (6.0.3) ...
Setting up mongodb-org-mongos (6.0.3) ...
Setting up mongodb-org-database (6.0.3) ...
Setting up mongodb-org (6.0.3) ...
Processing triggers for man-db (2.10.2-1) ...
Errors were encountered while processing:
 php7.4-fpm
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

There is no such requirement.

php7.4-fpm is likely appearing in the output from a previous apt operation:

1 not fully installed or removed.

I think that refers to libssl1.1 from above.

I tried now to fully remove mongodb-org and I got this when I opted to show the differences between the versions:

apt-get purge mongodb-org*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'mongodb-org-database-tools-extra' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-server' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-shell' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-database' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-unstable' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-mongos' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-shell' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-database-tools-extra' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-server' for glob 'mongodb-org*'
Note, selecting 'mongodb-org' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-tools' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-mongos' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-tools' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-tools-unstable' for glob 'mongodb-org*'
Package 'mongodb-org-tools-unstable' is not installed, so not removed
Package 'mongodb-org-unstable' is not installed, so not removed
Package 'mongodb-org-unstable-mongos' is not installed, so not removed
Package 'mongodb-org-unstable-server' is not installed, so not removed
Package 'mongodb-org-unstable-shell' is not installed, so not removed
Package 'mongodb-org-unstable-tools' is not installed, so not removed
Package 'mongodb-org-unstable-database-tools-extra' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libssl1.1 mongodb-database-tools mongodb-mongosh
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  mongodb-org* mongodb-org-database* mongodb-org-database-tools-extra* mongodb-org-mongos*
  mongodb-org-server* mongodb-org-shell* mongodb-org-tools*
The following held packages will be changed:
  mongodb-org mongodb-org-database mongodb-org-mongos mongodb-org-server mongodb-org-shell
  mongodb-org-tools
0 upgraded, 0 newly installed, 7 to remove and 168 not upgraded.
1 not fully installed or removed.
After this operation, 243 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 112928 files and directories currently installed.)
Removing mongodb-org (6.0.3) ...
Removing mongodb-org-database (6.0.3) ...
Removing mongodb-org-tools (6.0.3) ...
Removing mongodb-org-database-tools-extra (5.0.10) ...
Removing mongodb-org-mongos (6.0.3) ...
Removing mongodb-org-server (6.0.3) ...
Removing mongodb-org-shell (6.0.3) ...
Setting up php7.4-fpm (1:7.4.30-5+ubuntu22.04.1+deb.sury.org+1) ...

Configuration file '/etc/php/7.4/fpm/pool.d/www.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** www.conf (Y/I/N/O/D/Z) [default=N] ? D
--- /etc/php/7.4/fpm/pool.d/www.conf    2022-05-18 10:51:16.000000000 +0000
+++ /etc/php/7.4/fpm/pool.d/www.conf.dpkg-new   2022-08-01 15:06:35.000000000 +0000
@@ -41,7 +41,8 @@

 ; Set permissions for unix socket, if one is used. In Linux, read/write
 ; permissions must be set in order to allow connections from a web server. Many
-; BSD-derived systems allow connections regardless of permissions.
+; BSD-derived systems allow connections regardless of permissions. The owner
+; and group can be specified either by name or by their numeric IDs.
 ; Default Values: user and group are set as the running user
 ;                 mode is set to 0660
 listen.owner = www-data
@@ -235,7 +236,7 @@
 ;       anything, but it may not be a good idea to use the .php extension or it
 ;       may conflict with a real PHP file.
 ; Default Value: not set
-pm.status_path = /status
+;pm.status_path = /status

 ; The ping URI to call the monitoring page of FPM. If this value is not set, no
 ; URI will be recognized as a ping page. This could be used to test from outside
lines 5-21/21 (END)

That is a php thing you’ll have to resolve yourself. It is not related to mongodb, except for the co-incidence of an outstanding operation when you apt install/remove mongodb-org. How you resolve it up to you and your site requirements.

It will keep appearing on apt operations until you resolve it, regardless of what package it is (mongodb-org, curl, cowsay etc…)

2 Likes

Ok, thank you for your time.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.