web-dev-qa-db-ja.com

php7.0-fpm.service:メインプロセスが/etc/php/7.0/または/etc/php/7.1/を終了しました

走っているとき

Sudo apt-get updateおよび

Sudo apt-get upgrade

赤で次のエラーが表示されます:Failed to start The PHP 7.0 FastCGI Process Manager。

NOTICE: Not enabling PHP 7.0 FPM by default.
NOTICE: To enable PHP 7.0 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.0-fpm
NOTICE: You are seeing this message because you have Apache2 package installed.
Job for php7.0-fpm.service failed because the control process exited with error code.
See "systemctl status php7.0-fpm.service" and "journalctl -xe" for details.
invoke-rc.d: initscript php7.0-fpm, action "restart" failed.
● php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2017-10-07 12:01:40 PDT; 7ms ago
     Docs: man:php-fpm7.0(8)
  Process: 15565 ExecStart=/usr/sbin/php-fpm7.0 --nodaemonize --fpm-config /etc/php/7.0/fpm/php-fpm.conf (code=exited, status=78)
 Main PID: 15565 (code=exited, status=78)

Oct 07 12:01:40 cubi systemd[1]: Starting The PHP 7.0 FastCGI Process Manager...
Oct 07 12:01:40 cubi php-fpm7.0[15565]: [07-Oct-2017 12:01:40] ERROR: failed to open configuration file '/etc/php/7.0/fpm/php-fpm.conf': No such …rectory (2)
Oct 07 12:01:40 cubi php-fpm7.0[15565]: [07-Oct-2017 12:01:40] ERROR: failed to load configuration file '/etc/php/7.0/fpm/php-fpm.conf'
Oct 07 12:01:40 cubi php-fpm7.0[15565]: [07-Oct-2017 12:01:40] ERROR: FPM initialization failed
Oct 07 12:01:40 cubi systemd[1]: php7.0-fpm.service: Main process exited, code=exited, status=78/n/a
Oct 07 12:01:40 cubi systemd[1]: Failed to start The PHP 7.0 FastCGI Process Manager.
Oct 07 12:01:40 cubi systemd[1]: php7.0-fpm.service: Unit entered failed state.
Oct 07 12:01:40 cubi systemd[1]: php7.0-fpm.service: Failed with result 'exit-code'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package php7.0-fpm (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 php7.0-fpm
E: Sub-process /usr/bin/dpkg returned an error code (1)

/etc/php/7.0/および/etc/php/7.1/だけですが7.1にはfpmサブフォルダーがあります。どういうわけか、どこかで相互リンクする必要があります。

どうすれば修正できますか?

1
MeSo2

これは私のために働きました 私はUbuntu 17.04を実行しています)

Phpを削除した後、新規インストールを行いました。これに加えて、新しいフォルダがたくさん追加されました。現在、5.6 7.0 7.1および7.2を使用しています。

ソース:---(PHP 7.0.xからPHP 7.1.x への移行

Ubuntu 16.04での新規インストールの場合(私は17.04を実行しています)新しいバージョンをインストールする場合&&すべてのphpの依存関係を削除しますSudo apt-get remove php *

Sudo apt-get install php7.1 php7.1-cli php7.1-common libapache2-mod-php7.1 php7.1-mysql php7.1-fpm php7.1-curl php7.1-Gd php7.1-bz2 php7.1-mcrypt php7.1-json php7.1-tidy php7.1-mbstring php-redis php-memcached

1
MeSo2