로그인

검색

[php8.1-fpm 에러] Detected unsafe path transition

 

얼마전부터 php 에러가 발생되었다.

php 버전을 바꿔 설치했으나, 모두 에러가 발생한다.

 

 

Setting up cloud-init (24.4.1-0ubuntu0~22.04.1) ...
Setting up libopeniscsiusr (2.1.5-1ubuntu1.1) ...
Setting up dns-root-data (2024071801~ubuntu0.22.04.1) ...
Setting up docker-buildx-plugin (0.21.1-1~ubuntu.22.04~jammy) ...
Setting up php8.1-fpm (8.1.31-1+ubuntu22.04.1+deb.sury.org+1) ...
NOTICE: Not enabling PHP 8.1 FPM by default.
NOTICE: To enable PHP 8.1 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php8.1-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Detected unsafe path transition / (owned by hhhs) → /run (owned by root) during c  anonicalization of /run.
Job for php8.1-fpm.service failed because the control process exited with error   code.

See "systemctl status php8.1-fpm.service" and "journalctl -xeu php8.1-fpm.servic  e" for details.
invoke-rc.d: initscript php8.1-fpm, action "start" failed.
● php8.1-fpm.service - The PHP 8.1 FastCGI Process Manager
     Loaded: loaded (/lib/systemd/system/php8.1-fpm.service; enabled; vendor pre  set: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Sun 2025-03-02   19:50:33 KST; 5ms ago
       Docs: man:php-fpm8.1(8)
    Process: 2131978 ExecStart=/usr/sbin/php-fpm8.1 --nodaemonize --fpm-config /  etc/php/8.1/fpm/php-fpm.conf (code=exited, status=78)
    Process: 2131990 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run  /php/php-fpm.sock /etc/php/8.1/fpm/pool.d/www.conf 81 (code=exited, status=0/SUC  CESS)
   Main PID: 2131978 (code=exited, status=78)
        CPU: 21ms
dpkg: error processing package php8.1-fpm (--configure):
 installed php8.1-fpm package post-installation script subprocess returned error   exit status 1
Setting up pollinate (4.33-3ubuntu2.1) ...
Setting up docker-compose-plugin (2.33.1-1~ubuntu.22.04~jammy) ...
Setting up docker-ce-cli (5:28.0.1-1~ubuntu.22.04~jammy) ...
Setting up libdevmapper1.02.1:amd64 (2:1.02.175-2.1ubuntu5) ...
Setting up dmsetup (2:1.02.175-2.1ubuntu5) ...
update-initramfs: deferring update (trigger activated)
Setting up docker-ce-rootless-extras (5:28.0.1-1~ubuntu.22.04~jammy) ...
Setting up libdevmapper-event1.02.1:amd64 (2:1.02.175-2.1ubuntu5) ...
Setting up open-iscsi (2.1.5-1ubuntu1.1) ...
iscsid.service is a disabled or a static unit, not starting it.
Setting up docker-ce (5:28.0.1-1~ubuntu.22.04~jammy) ...
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 142.
Setting up liblvm2cmd2.03:amd64 (2.03.11-2.1ubuntu5) ...
Setting up dmeventd (2:1.02.175-2.1ubuntu5) ...
dm-event.service is a disabled or a static unit not running, not starting it.
Setting up lvm2 (2.03.11-2.1ubuntu5) ...
update-initramfs: deferring update (trigger activated)
Detected unsafe path transition / (owned by hhhs) → /run (owned by root) during c  anonicalization of /run/lock.
Detected unsafe path transition / (owned by hhhs) → /run (owned by root) during c  anonicalization of /run.

Processing triggers for initramfs-tools (0.140ubuntu13.4) ...
update-initramfs: Generating /boot/initrd.img-5.15.0-133-generic
Processing triggers for libc-bin (2.35-0ubuntu3.9) ...
Processing triggers for rsyslog (8.2112.0-2ubuntu2.2) ...
Processing triggers for man-db (2.10.2-1) ...
Errors were encountered while processing:
 php8.1-fpm
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

 

 

 

 

해결

var/run 폴더에 php 폴더를 만들어 주면 된다.

sudo mkdir /var/run/php
sudo apt install --reinstall php-fpm

 

 

 

 

이 게시물을

이 댓글을 삭제하시겠습니까?