ホームページ  >  記事  >  運用・保守  >  CentOS 7 for ARM がワンクリック Lnmp のインストールに失敗する

CentOS 7 for ARM がワンクリック Lnmp のインストールに失敗する

巴扎黑
巴扎黑オリジナル
2017-06-23 14:17:184751ブラウズ

背景

以前、国慶節の休暇を利用して、戻ってきたらすぐにサーバー環境をセットアップするために、ワンクリックのlnmpを使用してすぐにデプロイできるように準備しました。しかし、インストールは失敗しました...

エラー

私の小さなRaspberry Piでのインストールは本当に遅かったので、CPUが強力ではなく、待つしかありませんでした。昼食を食べてから戻ってくると、完了したように見えましたが、次のようなエラーメッセージが表示されました

PHPのインストールは失敗しました。エラーが報告された場合は、もう一度試して、問題が何であるかを確認してください。 ./upgrade.sh スクリプトを使用して再インストールできますが、エラー メッセージが表示されます

============================== Check install ==============================
Checking ...
Nginx: OK
MariaDB: OK
Error: PHP install failed.
Sorry, Failed to install LNMP!
Please visit  feedback errors and logs.
You can download /root/lnmp-install.log from your server,and upload lnmp-install.log to LNMP Forum.

インストール ログを注意深く確認してください。重要な情報が見つかりました

+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|                            |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL.... SUCCESS! 
/bin/lnmp: line 27: /etc/init.d/php-fpm: No such file or directory
======== upgrade php failed ======
upgrade php log: /root/upgrade_lnmp_php.log
You upload upgrade_lnmp_php.log to LNMP Forum for help.
「libcurl をインストールしてください」というエラーが表示されます。VPS にインストールしたときにこの問題が発生しなかったのは、CentOS for Raspberry Pi のバージョンではないでしょうか。このこと?

解決策

エラープロンプトに従ってインストールし、yumを使用して直接インストールしようとしますが、これはパッケージマネージャーに見つかりませんので、直接ダウンロードしてコンパイルしてインストールします

CentOSはSVNdocxをコンパイルします

configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
長いコンパイルを経て、ようやくコンパイルされました インストールは成功しました

引き続きPHPのインストールを試みます、今度はPHPを普通にコンパイルしています

wget https://curl.haxx.se/download/curl-7.50.3.tar.gz
tar zvxf curl-7.50.3.tar.gz
cd curl-7.50.3
./configure --enable-shared
make
make install
長いコンパイルを経て、ようやく…

コンパイルが完了しました、しかし...

Generating files
configure: creating ./config.status
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/fpm/php-fpm.conf
config.status: creating sapi/fpm/init.d.php-fpm
config.status: creating sapi/fpm/php-fpm.service
config.status: creating sapi/fpm/php-fpm.8
config.status: creating sapi/fpm/status.html
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
まだいくつか問題があるようですが、拡張子が見つからないようです

+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|                            |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL...... SUCCESS! 
Starting php-fpm Failed loading /usr/local/zend/ZendGuardLoader.so:  /usr/local/zend/ZendGuardLoader.so: cannot open shared object file: No such file or directory
 done
======== upgrade php completed ======
。検索すると、lnmp フォーラムにこのような問題があることがわかりました。投稿アドレスの作成者は、これがシステム DNS であると述べています。問題は、ダウンロードしたものが破損しているためです。今のところは無視してください。php.ini で直接コメントアウトするか、完全な再インストールを直接ダウンロードしてください。

追記

公式zendから32ビットsoファイルをダウンロードし直して入れてみたところ、やはり動作しないことが分かり、デフォルトバージョンのPHP 5.4.45を再インストールしてみたところ、コンパイル中のままでした。 ...

Update

紆余曲折を経てようやく完了、PHPをコンパイルしたところ、やはり失敗していることが分かりました

[root@rpi2 ~]# ls /usr/local/zend/                   
ZendGuardLoader.so
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|                            |
+-------------------------------------------+
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm /etc/init.d/php-fpm:行57: /usr/local/php/sbin/php-fpm: 没有那个文件或目录
 failed
======== upgrade php failed ======
upgrade php log: /root/upgrade_lnmp_php.log
You upload upgrade_lnmp_php.log to LNMP Forum for help.
显示的是找不到php-fpm这个文件,于是我想查找下这个文件在哪
$ whereis php-fpm
php-fpm: /usr/bin/php-fpm /usr/sbin/php-fpm /etc/php-fpm.conf /etc/php-fpm.d /usr/share/man/man8/php-fpm.8.gz
通过查找发现确实不在那个目录下面,这个简单,直接从/usr/sbin下面把php-fpm复制过去就好了
はい、引き続きエラー報告してください、フォローしてください。プロンプト

$ cd /usr/local/php/
$ ls
etc  php-fpm
$ sudo mkdir sbin
$ sudo mv php-fpm sbin/
$ lnmp restart
Error: You must be root to run this script!
[kbdancerrpi@rpi2 php]$ sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|                            |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
Shutting down MySQL. SUCCESS! 
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm [01-Jan-1970 13:18:55] ERROR: failed to open error_log (/usr/local/php/var/log/php-fpm.log): No such file or directory (2)
[01-Jan-1970 13:18:55] ERROR: failed to post process the configuration
[01-Jan-1970 13:18:55] ERROR: FPM initialization failed
 failed
はまだエラーを報告しています、続行

$ cd /usr/local/php/
$ sudo mkdir var
$ cd var/
$ sudo mkdir log
$ cd log/
$ ls
$ sudo touch php-fpm.log
$ sudo lnmp restart
+-------------------------------------------+
|    Manager for LNMP, Written by Licess    |
+-------------------------------------------+
|                            |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx...  done
Shutting down MySQL. SUCCESS! 
Gracefully shutting down php-fpm warning, no pid file found - php-fpm is not running ?
Starting LNMP...
Starting nginx...  done
Starting MySQL..... SUCCESS! 
Starting php-fpm [01-Jan-1970 13:20:18] ERROR: Unable to create the PID file (/usr/local/php/var/run/php-fpm.pid).: No such file or directory (2)
[01-Jan-1970 13:20:18] ERROR: FPM initialization failed
 failed
OK、ついに完了しました。すごいですね、lnmpの作者はARMで実行するときにlnmpが問題を引き起こすかどうかテストしていないのだと思います。改善できるかも…

以上がCentOS 7 for ARM がワンクリック Lnmp のインストールに失敗するの詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。