![php-fpm 안전하지 않은 경로 전환 오류 메시지가 감지되었습니다. 어떻게?](https://rvso.com/image/760633/php-fpm%20%EC%95%88%EC%A0%84%ED%95%98%EC%A7%80%20%EC%95%8A%EC%9D%80%20%EA%B2%BD%EB%A1%9C%20%EC%A0%84%ED%99%98%20%EC%98%A4%EB%A5%98%20%EB%A9%94%EC%8B%9C%EC%A7%80%EA%B0%80%20%EA%B0%90%EC%A7%80%EB%90%98%EC%97%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%20%EC%96%B4%EB%96%BB%EA%B2%8C%3F.png)
나는 Linux/ubuntu에 대해 거의 알지 못하지만 실행하려는 웹 서버에는 그것이 필요했습니다. 나는 모든 것을 설정하고 훌륭하게 실행했으며 지금은 한동안 이것을 얻고 있습니다. apt를 사용하여 무언가를 설치하려고 할 때마다 이 오류가 발생합니다. 비슷한 글을 본 적이 있는데, 다들 폴더를 만들어서 서비스를 시작해보라고 하는데 매번 같은 결과가 나옵니다.
root@srvweb00:/run# sudo apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
samba is already the newest version (2:4.11.6+dfsg-0ubuntu1.6).
The following package was automatically installed and is no longer required:
libzip5
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up php7.4-fpm (7.4.13-1+ubuntu20.04.1+deb.sury.org+1) ...
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.
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2020-12-03 16:15:33 UTC; 16ms ago
Docs: man:php-fpm7.4(8)
Process: 39404 ExecStart=/usr/sbin/php-fpm7.4 --nodaemonize --fpm-config /etc/php/7.4/fpm/php-fpm.conf (code=exited, status=78)
Process: 39424 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS)
Main PID: 39404 (code=exited, status=78)
Dec 03 16:15:33 <FQDN> systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Dec 03 16:15:33 <FQDN> php-fpm7.4[39404]: [03-Dec-2020 16:15:33] ERROR: unable to bind listening socket for address '/run/php/php7.4-fpm.sock': No such file or directory (2)
Dec 03 16:15:33 <FQDN> php-fpm7.4[39404]: [03-Dec-2020 16:15:33] ERROR: FPM initialization failed
Dec 03 16:15:33 <FQDN> systemd[1]: php7.4-fpm.service: Main process exited, code=exited, status=78/CONFIG
Dec 03 16:15:33 <FQDN> systemd[1]: php7.4-fpm.service: Failed with result 'exit-code'.
Dec 03 16:15:33 <FQDN> systemd[1]: Failed to start The PHP 7.4 FastCGI Process Manager.
dpkg: error processing package php7.4-fpm (--configure):
installed php7.4-fpm package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of php-fpm:
php-fpm depends on php7.4-fpm; however:
Package php7.4-fpm is not configured yet.
dpkg: error processing package php-fpm (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
php7.4-fpm
php-fpm
E: Sub-process /usr/bin/dpkg returned an error code (1)
내가 시도한 기사/사물 중 일부:
답변1
근본 원인은 다음 오류 메시지로 식별됩니다.
Detected unsafe path transition / → /run during canonicalization of /run.
이는 시스템의 루트 디렉터리에 /
잘못된 소유권이나 권한이 있을 때 발생합니다.
문제를 해결하려면 소유권과 권한을 수정하세요.
sudo chown root /
sudo chgrp root /
sudo chmod u=rwx,go=rx /
이 문제가 해결되면 부분적으로 설치된 패키지를 수정할 수 있습니다.
sudo apt -f install
그런 다음 다음 문제로 넘어가세요.