linux安装lanmp环境出现错误一览

版权声明:老哥,这些都是我手打的,给点面子 https://blog.csdn.net/weixin_43312108/article/details/87894020

···
configure: error: expected an absolute directory name for --prefix: =/usr/local/apr
···
嗯,错误提示是要求使用绝对路径,我这也本身是绝对路径,而我这个错误主要在于在 --prefix =/usr/local/apr
中间手贱加了空格。忘谨记。

出现
make[1]: *** [pcrecpp.lo] Error 1

安装pcre时出现以下错误:make[1]: *** [pcrecpp.lo] Error 1
说明缺少安装gcc-c++库,安装即可
安装命令:yum -y install gcc-c++
重新configure,make && make install通过。

安装mysql时,出现了
CMake Error at cmake/readline.cmake:83(MESSAGE):Curses library not found.
解决方案是
安装ncurses-devel:yum -y install ncurses-devel(Debian/Ubuntu需安装libncurses5-dev)

删除CMakeCache.txt(该文件在mysql解压目录)

重新执行编译安装
参考

https://blog.csdn.net/zsl10/article/details/51824091

初始话数据库失败出现以下错误
首先错误
COLLATION ‘latin1_swedish_ci’ is not valid for CHARACTER SET ‘utf8’
Installation of system tables failed!
具体修改方法
在安装的时候没有加上字符集设置,后修改如下
./scripts/mysql_install_db --user=mysql --collation-server=utf8_general_ci
即可

在启动mysql服务的时候出现以下错误
Starting MySQL.The server quit without updating PID file (/[FAILED]l/mysql/data/izwz9h8c7rbp1v4alv0v53z.pid)
注意,引起这样的错误原因有很多,需要打开本身的错误日志来一一查找原因错误,一一解决。
我的错误本身有多个原因,最开始是字符集编译错误,需要在字符集编译阶段加上字符集对应编码实现
但后来又发现一个错误

'./mysql-bin.index' not found (Errcode: 13)

原因在于文件的权限不足,
解决方法提升文件的权限

chgrp -R mysql /usr/local/mysql/data && chown -R mysql /usr/local/mysql/data 

然后在启动的时候还是出现错误,

Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

解决方法

/usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data &

这样,一个坑接着一个坑的跨过,最后成功解决。
总结:凡是错误,如果不是特别明显报错信息,需要到错误日志里面一一查找error信息以获取解决方向。

在配置完apache中的关于php交互问题之后,发现出现了一个错误,即网站无法正常访问,起初我以为是阿里云服务器的安全组配置问题,但是在修改安全组选项之后,依然无法访问,于是我借用curl工具在服务器端进行访问主页,

curl http://127.0.0.1
//然后就返回来这样的错误
curl: (52) Empty reply from server

然后查找原因,最后发现应该是在修改安全组的时候,没有注意,只是进程卡塞,解决方法也很简单,重启apache即可喽,是在不行就将整个服务器重启,反正是个人的,想怎么搞就怎么搞(有点嚣张,嘿嘿)

在之后安装nginx中,在编译过程中出现了

./configure: error: the HTTP rewrite module requires the PCRE library.
//还有相应的错误提示
./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library.   You can either disable the module by using
--without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
--with-http_ssl_module --with-openssl=<path> options.
//解决方案利用yum源安装OpenSSL
yum -y install openssl openssl-devel

备注:

记一个易忘的知识点,:x,yd 删除从x行到Y行之间的代码
(待续)

猜你喜欢

转载自blog.csdn.net/weixin_43312108/article/details/87894020