Работаю с RaspberryPi Model 3B.
Ставил php и nginx по гайду от Grav:
https://getgrav.org/blog/raspberrypi-nginx-php7-dev
Решил использовать гайд, т.к. по-старому(apt install nginx php-fpm) выдавало ошибку.
Как оказалось, проблема не во мне, проблема где-то внутри.
Ставлю командой
pi@raspi ~ sudo apt-get install -t buster php7.2 php7.2-curl php7.2-gd php7.2-fpm php7.2-cli php7.2-opcache php7.2-mbstring php7.2-xml php7.2-zip
Всё скачивается, распаковывается, но при настройке вибивает ошибку:
ЛогCreating config file /etc/php/7.2/fpm/php.ini with new version
Created symlink /etc/systemd/system/multi-user.target.wants/php7.2-fpm.service → /lib/systemd/system/php7.2-fpm.service.
Job for php7.2-fpm.service failed because the control process exited with error code.
See "systemctl status php7.2-fpm.service" and "journalctl -xe" for details.
invoke-rc.d: initscript php7.2-fpm, action "start" failed.
● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-06-04 20:00:52 +07; 36ms ago
Docs: man:php-fpm7.2(8)
Process: 8667 ExecStart=/usr/sbin/php-fpm7.2 --nodaemonize --fpm-config /etc/php/7.2/fpm/php-fpm.conf (code=exited, status=127)
Main PID: 8667 (code=exited, status=127)
Jun 04 20:00:52 raspi systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
Jun 04 20:00:52 raspi php-fpm7.2[8667]: [122B blob data]
Jun 04 20:00:52 raspi systemd[1]: php7.2-fpm.service: Main process exited, code=exited, status=127/n/a
Jun 04 20:00:52 raspi systemd[1]: Failed to start The PHP 7.2 FastCGI Process Manager.
Jun 04 20:00:52 raspi systemd[1]: php7.2-fpm.service: Unit entered failed state.
Jun 04 20:00:52 raspi systemd[1]: php7.2-fpm.service: Failed with result 'exit-code'.
dpkg: error processing package php7.2-fpm (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php7.2:
php7.2 depends on libapache2-mod-php7.2 | php7.2-fpm | php7.2-cgi; however:
Package libapache2-mod-php7.2 is not installed.
Package php7.2-fpm is not configured yet.
Package php7.2-cgi is not installed.
dpkg: error processing package php7.2 (--configure):
dependency problems - leaving unconfigured
Processing triggers for systemd (232-25+deb9u11) ...
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
php7.2-fpm
php7.2
E: Sub-process /usr/bin/dpkg returned an error code (1)
systemctl status php7.2-fpm.service✘ pi@raspi ~ systemctl status php7.2-fpm.service
● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-06-04 20:00:52 +07; 3min 24s ago
Docs: man:php-fpm7.2(8)
Main PID: 8667 (code=exited, status=127)
Jun 04 20:00:52 raspi systemd[1]: Starting The PHP 7.2 FastCGI Process Manager...
Jun 04 20:00:52 raspi php-fpm7.2[8667]: [122B blob data]
Jun 04 20:00:52 raspi systemd[1]: php7.2-fpm.service: Main process exited, code=exited, status=127/n/a
Jun 04 20:00:52 raspi systemd[1]: Failed to start The PHP 7.2 FastCGI Process Manager.
Jun 04 20:00:52 raspi systemd[1]: php7.2-fpm.service: Unit entered failed state.
Jun 04 20:00:52 raspi systemd[1]: php7.2-fpm.service: Failed with result 'exit-code'.
`journalctl -xe` выдаёт только sshd и kernel, ничего связанного с apt или php нет.
При выполнении php -v выдаёт это:
✘ pi@raspi ~ php -v
php: error while loading shared libraries: ☻7�: cannot open shared object file: No such file or directory
Очень удивляет эта последовательность символов, т.к. она безусловно важна, однако ничего из неё не понятно.
Установка nginx'а тоже ничего нее даёт:
✘ pi@raspi ~ sudo apt install nginx-full nginx✘ pi@raspi ~ sudo apt install nginx-full nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nginx-full : Depends: libnginx-mod-http-auth-pam (= 1.10.3-1+deb9u2) but 1.14.2-2 is to be installed
Depends: libnginx-mod-http-dav-ext (= 1.10.3-1+deb9u2) but 1.14.2-2 is to be installed
Depends: libnginx-mod-http-echo (= 1.10.3-1+deb9u2) but 1.14.2-2 is to be installed
Depends: libnginx-mod-http-geoip (= 1.10.3-1+deb9u2) but 1.14.2-2 is to be installed
Depends: libnginx-mod-http-image-filter (= 1.10.3-1+deb9u2) but 1.14.2-2 is to be installed
Depends: libnginx-mod-http-subs-filter (= 1.10.3-1+deb9u2) but 1.14.2-2 is to be installed
Depends: libnginx-mod-http-upstream-fair (= 1.10.3-1+deb9u2) but 1.14.2-2 is to be installed
Depends: libnginx-mod-http-xslt-filter (= 1.10.3-1+deb9u2) but 1.14.2-2 is to be installed
Depends: libnginx-mod-mail (= 1.10.3-1+deb9u2) but 1.14.2-2 is to be installed
Depends: libnginx-mod-stream (= 1.10.3-1+deb9u2) but 1.14.2-2 is to be installed
Depends: nginx-common (= 1.10.3-1+deb9u2) but 1.14.2-2 is to be installed
E: Unable to correct problems, you have held broken packages.
Однако, становится понятно, что мы have held broken packages, только почему broken - не понятно.