记录一些常用的函数和瞎折腾的过程……

centos8下安装lnmp的错误解决方法

提醒:本文最后更新于 1227 天前,文中所描述的信息可能已发生改变,请谨慎使用。

安装LNMP时,无法安装mysql和php,查询日志,mysql有如下报错:

CMake Error at rapid/plugin/group_replication/rpcgen.cmake:100 (MESSAGE):
Could not find rpcgen

此时需要自己安装rpcgen,因为它已不在系统的源里,具体安装方法如下:

[root@server ~]$ wget https://github.com/thkukuk/rpcsvc-proto/releases/download/v1.4.2/rpcsvc-proto-1.4.2.tar.xz
[root@server ~]$ tar -xvJf rpcsvc-proto-1.4.2.tar.xz
[root@server ~]$ cd rpcsvc-proto-1.4.2
[root@server ~]$ ./configure
[root@server ~]$ make && make install

安装php也有报错导致无法安装,查看日志,具体报错信息如下:

configure: error: Package requirements (oniguruma) were not met:
Package 'oniguruma', required by 'virtual:world', not found

这是没有安装配置oniguruma引起的问题,安装oniguruma即可解决问题:

[root@server ~]$ wget https://github.com/kkos/oniguruma/archive/v6.9.4.tar.gz -O oniguruma-6.9.4.tar.gz
[root@server ~]$ tar -zxvf oniguruma-6.9.4.tar.gz
[root@server ~]$ cd oniguruma-6.9.4
[root@server ~]$ ./autogen.sh && ./configure --prefix=/usr
[root@server ~]$ make && make install

同时还有这个错误:

make: *** No targets specified and no makefile found. Stop.
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target 'install'. Stop.

freetype这个库需要更新一下版本,打开lnmp/include/version.sh文件,查找Freetype_Ver修改版本:

Freetype_Ver='freetype-2.9'

注意,如果系统是最小化安装,在安装上面的软件包的时候,可能会出现这样错误:

[root@server ~]$ -bash: make: command not found

此时你需要安装make、gcc等软件包:

[root@server ~]$ yum install gcc automake autoconf libtool make -y
[root@server ~]$ yum install gcc gcc-c++ -y