Linux装环境Lnmp遇见过的问题及相关信息

1、Libxml错误

error: libxml2 not found. Please check your libxml2 installation.

ubuntu解决办法

sudo apt-get install libxml2
sudo apt-get install libxml2-dev

 如果遇到

Unable to locate package libxml2-dev

麻烦更新一下

sudo apt-get update

 2、PCRE library

configure nginx的时候

error: the HTTP rewrite module requires the PCRE library

 安装包

sudo apt-get install libpcre3 libpcre3-dev

sudo apt-get install openssl libssl-dev

 3、编译扩展openssl的时候

root@weiqiang:/home/php-7.1.33/ext/openssl# /usr/local/php/bin/phpize
Cannot find config.m4. 
Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module

直接执行

cp ./config0.m4 ./config.m4

 4、阿里云的ubuntu 16.04 64 bit 的系统出现

Cannot find OpenSSL's <evp.h> 
yum install openssl openssl-devel

ln -s /usr/lib64/libssl.so /usr/lib/

链接

https://github.com/mongodb/mongo-php-driver/issues/138#issuecomment-184749966
sudo apt-get install -y autoconf g++ make openssl libssl-dev libcurl4-openssl-dev
sudo apt-get install -y libcurl4-openssl-dev pkg-config
sudo apt-get install -y libsasl2-dev

 5、搭建swoole + ubuntu16.04 64 bit的时候 - Libpng - 创建和处理PNG(便携式网络图形)光栅图像文件的应用程序中使用-PHP的GD库的依赖

configure: error: png.h not found.
sudo apt install libpng-dev

上面是Ubuntu的安装,也可以下载tar压缩文件解压后编译安装

http://downloads.sourceforge.net/libpng/
./configure --prefix=/usr/local/libpng
make
make install

注意用root角色执行防止因为文件权限缺失导致失败

相关链接:https://blog.csdn.net/swxcuc/article/details/78994744

6、mcrypt 是php里面重要的加密支持扩展库-告知需要重新安装

 mcrypt.h not found. Please reinstall libmcrypt.
sudo apt-get install libmcrypt-dev

7、Linux查看某一个端口被占用

netstat -tunpl
kill pid_number //关闭该进程

 8、linux解压文件

linux 解压 tar 包
tar -xvf file.tar

linux 解压 zip包
unzip file.zip

 9 端口占用 

netstat -tunpl
kill pid_number //关闭该进程

 10 查看nginx进程

ps -ef | grep nginx

11 查看内存占用情况

ps aux|grep php-fpm
top
kill -USR2 42891  --- 42891是master fpm process的进程ID - 平滑重启
/usr/local/php/sbin/php-fpm restart

 

posted @ 2019-11-21 23:16  许伟强  阅读(466)  评论(0编辑  收藏  举报