LNMP下安装phpmyadmin的一个小错误解决办法
环境:ubuntu16.04 + nginx1.10.0 + php7.04 + mysql5.6
安装phpmyadmin之后tail nginx 的错误日志,提示以下:
2016/06/30 15:41:05 [error] 25694#25694: *59 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(/usr/share/php/php-gettext/gettext.inc): failed to open stream: No such file or directory in /usr/share/phpmyadmin/libraries/common.inc.php on line 77
PHP message: PHP Fatal error: require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.:/usr/share/php') in /usr/share/phpmyadmin/libraries/common.inc.php on line 77" while reading response header from upstream, client: ::1, server: _, request: "GET /phpmyadmin/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "localhost"
其中第77行代码是 require_once GETTEXT_INC;
解决办法是:sudo apt-get install php-gettext