解决CentOS7宝塔面板无法安装Pure-ftpd
在使用阿里云轻量型香港主机时,由于安装启动BBR-PLUS加速内核导致CentOS7宝塔面板无法安装Pure-ftpd软件,每次安装完毕后仍显示未安装。
系统:CentOS 7.6.1810(Py2.7.5)
错误信息:configure: error: C preprocessor "/lib/cpp" fails
正在选择下载节点... Installing pure-ftpd... configure: WARNING: unrecognized options: --with-rfc2640checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether UID '0' is supported by ustar format... yes checking whether GID '0' is supported by ustar format... yes checking how to create a ustar tar archive... gnutar checking whether make supports nested variables... (cached) yes checking whether to enable maintainer-specific portions of Makefiles... nochecking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... nochecking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of gcc... gcc3 checking for ranlib... ranlib checking how to run the C preprocessor... /lib/cpp configure: error: in `/root/pure-ftpd-1.0.49': configure: error: C preprocessor "/lib/cpp" fails sanity check See `config.log' for more details make: *** No targets specified and no makefile found. Stop. ========================================================
问题出在这里 configure: error: C preprocessor "/lib/cpp" fails
原因是缺少内核头文件
解决方法: 使用yum安装kernel header:
yum install kernel-headers
安装时需要输入y
[root@server ~]# yum install kernel-headersLoaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.newmediaexpress.com * epel: sg.fedora.ipserverone.com * extras: mirror.newmediaexpress.com * updates: mirror.newmediaexpress.com Resolving Dependencies --> Running transaction check ---> Package kernel-headers.x86_64 0:3.10.0-957.27.2.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved =========================================================================================================================================== Package Arch Version Repository Size =========================================================================================================================================== Installing: kernel-headers x86_64 3.10.0-957.27.2.el7 updates 8.0 M Transaction Summary =========================================================================================================================================== Install 1 Package Total download size: 8.0 M Installed size: 3.6 M Is this ok [y/d/N]: y Downloading packages: kernel-headers-3.10.0-957.27.2.el7.x86_64.rpm | 8.0 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. ** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows: glibc-headers-2.17-260.el7_6.6.x86_64 has missing requires of kernel-headers >= ('0', '2.2.1', None) libdrm-devel-2.4.91-3.el7.x86_64 has missing requires of kernel-headers >= ('0', '2.6.27', '0.144.rc0.git2.fc10') Installing : kernel-headers-3.10.0-957.27.2.el7.x86_64 1/1 Verifying : kernel-headers-3.10.0-957.27.2.el7.x86_64 1/1 Installed: kernel-headers.x86_64 0:3.10.0-957.27.2.el7 Complete!
安装完毕,然后到宝塔面板再进行安装Pure-ftpd,就可以顺利安装了。