package php7.4-fpm 7.4.3-4ubuntu2.6 failed to install/upgrade: installed php7.4-fpm package post-installation script subprocess returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php7.4 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
No socket file is created for php-fpm
ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: php7.4-fpm 7.4.3-4ubuntu2.6
ProcVersionSign
Uname: Linux 5.4.0-86-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Sun Sep 26 22:31:12 2021
ErrorMessage: installed php7.4-fpm package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2018-08-09 (1148 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2, 2.7.17-4
RelatedPackageV
dpkg 1.19.7ubuntu3
apt 2.0.6
SourcePackage: php7.4
Title: package php7.4-fpm 7.4.3-4ubuntu2.6 failed to install/upgrade: installed php7.4-fpm package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to focal on 2020-05-31 (486 days ago)
Setting up php7.4-fpm (7.4.3-4ubuntu2.6) ...
NOTICE: Not enabling PHP 7.4 FPM by default.
NOTICE: To enable PHP 7.4 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.4-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Detected unsafe path transition / → /run during canonicalization of /run.
Job for php7.4-fpm.service failed because the control process exited with error code.
See "systemctl status php7.4-fpm.service" and "journalctl -xe" for details.
invoke-rc.d: initscript php7.4-fpm, action "restart" failed.
[0;1;31m●[0m php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (]8;;file:
Active: [0;1;31mfailed[0m (Result: exit-code) since Sun 2021-09-26 22:31:11 CEST; 32ms ago
Docs: ]8;;man:
Process: 9683 ExecStart=
Process: 9686 ExecStopPost=
Main PID: 9683 (code=exited, status=78)
Sep 26 22:31:11 Vivek-PC systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Sep 26 22:31:11 Vivek-PC php-fpm7.4[9683]: [26-Sep-2021 22:31:11] ERROR: unable to bind listening socket for address '/run/php/
Sep 26 22:31:11 Vivek-PC php-fpm7.4[9683]: [26-Sep-2021 22:31:11] ERROR: FPM initialization failed
Sep 26 22:31:11 Vivek-PC systemd[1]: [0;1;39m
Sep 26 22:31:11 Vivek-PC systemd[1]: [0;1;38;
Sep 26 22:31:11 Vivek-PC systemd[1]: [0;1;31m
dpkg: error processing package php7.4-fpm (--configure):
installed php7.4-fpm package post-installation script subprocess returned error exit status 1
description: | updated |
Hi vivek,
Does it work if you do:
$ sudo mkdir -p /var/run/php/
$ sudo systemctl restart php7.4-fpm
I notice your /run directory is mounted as a temp filesystem, which should work but might be involved in whatever's gone wrong:
tmpfs 1218676 3820 1214856 1% /run
Fwiw, on my 20.04 system I have:
$ ls -l /var/run
lrwxrwxrwx 1 root root 4 Dec 17 2019 /var/run -> /run/
$ ls -ld /run
drwxr-xr-x 48 root root 1680 Oct 1 06:33 /run/
Can you check and see if your /run and /var/run are configured correctly, and see if creating the /var/run/php directory resolves the installation problem?
I spotted this stackoverflow question that seems to match what you're seeing: /stackoverflow. com/questions/ 65841710/ installing- php-on- debian- returns- an-error- code
https:/