Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

nginx - Installing PHP on Debian returns an error code

I was installing NGINX, php-fpm and PHPMyAdmin after reinstalling a new OS(Twister OS).

sudo apt-get install php-fpm 

returned the following error:

Detected unsafe path transition / → /run during canonicalization of /run.
Job for php7.3-fpm.service failed because the control process exited with error code.
See "systemctl status php7.3-fpm.service" and "journalctl -xe" for details.
invoke-rc.d: initscript php7.3-fpm, action "start" failed.
● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2021-01-22 08:59:01 CET; 30ms ago
     Docs: man:php-fpm7.3(8)
  Process: 13041 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf (code=exited, status=78)
 Main PID: 13041 (code=exited, status=78)

Jan 22 08:59:01 raspberrypi systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Jan 22 08:59:01 raspberrypi php-fpm7.3[13041]: [22-Jan-2021 08:59:01] ERROR: unable to bind listening socket for address '/run/php/php7.3-fpm.sock': No such file or directory (2)
Jan 22 08:59:01 raspberrypi php-fpm7.3[13041]: [22-Jan-2021 08:59:01] ERROR: FPM initialization failed
Jan 22 08:59:01 raspberrypi systemd[1]: php7.3-fpm.service: Main process exited, code=exited, status=78/CONFIG
Jan 22 08:59:01 raspberrypi systemd[1]: php7.3-fpm.service: Failed with result 'exit-code'.
Jan 22 08:59:01 raspberrypi systemd[1]: Failed to start The PHP 7.3 FastCGI Process Manager.

systemctl status php7.3-fpm.service returns:

php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2021-01-22 08:59:01 CET; 15min ago
     Docs: man:php-fpm7.3(8)
 Main PID: 13041 (code=exited, status=78)

sudo journalctl -xe returns:

 -- Subject: A start job for unit phpsessionclean.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit phpsessionclean.service has begun execution.
-- 
-- The job identifier is 2772.
Jan 22 09:09:01 raspberrypi systemd[1]: phpsessionclean.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit phpsessionclean.service has successfully entered the 'dead' state.
Jan 22 09:09:01 raspberrypi systemd[1]: Started Clean php session files.
-- Subject: A start job for unit phpsessionclean.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit phpsessionclean.service has finished successfully.
-- 
-- The job identifier is 2772.
Jan 22 09:11:37 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:11:37 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:11:37 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:11:37 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:11:37 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:11:37 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:11:38 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:11:38 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:11:38 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:11:38 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:15:49 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:15:49 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:15:49 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:15:49 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:15:49 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:15:50 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:15:50 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:15:50 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:15:50 raspberrypi wpa_supplicant[555]: RRM: Ignoring radio measurement request: Not RRM network
Jan 22 09:15:52 raspberrypi sudo[13497]:       pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xe
Jan 22 09:15:52 raspberrypi sudo[13497]: pam_unix(sudo:session): session opened for user root by (uid=0)

I searched through all installed packages 'php' with:

dpkg -l|grep php

This returned:

ii  php-common                            2:69                                   all      
    Common files for PHP packages
iU  php-fpm                               2:7.3+69                               all          server-side, HTML-embedded scripting language (FPM-CGI binary) (default)
ii  php7.3-cli                            7.3.19-1~deb10u1                       armhf        command-line interpreter for the PHP scripting language
ii  php7.3-common                         7.3.19-1~deb10u1                       armhf        documentation, examples and common module for PHP
iF  php7.3-fpm                            7.3.19-1~deb10u1                       armhf        server-side, HTML-embedded scripting language (FPM-CGI binary)
ii  php7.3-json                           7.3.19-1~deb10u1                       armhf        JSON module for PHP
ii  php7.3-opcache                        7.3.19-1~deb10u1                       armhf        Zend OpCache module for PHP
ii  php7.3-readline                       7.3.19-1~deb10u1                       armhf        readline module for PHP

Can anyone please help me to find the problem and help me to solve it?

Thanks

Sorry for my english, im german :)

question from:https://stackoverflow.com/questions/65841710/installing-php-on-debian-returns-an-error-code

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...