当前位置: 首页 > news >正文

el7升级Apache模块编译

1.背景

接续https://blog.csdn.net/nanhai_happy/article/details/140566070,由于升级升级Apache过程中,发现需要使用的mod_wsgi、mod_systemd和mod_cgi模块缺失,故接着解决继续编译生成。

2. 编译mod_cgi、mod_system

2.1 安装依赖

yum install systemd-devel
rpm -ivh httpd-devel-2.4.62-1.aarch64.rpm

2.2 编译

cd /root/rpmbuild/BUILD/httpd-2.4.62/modules/generators
apxs -i -a -c mod_cgi.c
cd /root/rpmbuild/BUILD/httpd-2.4.62/modules/arch/unix
apxs -i -a -c mod_systemd.c

3. 编译mod_wsgi

3.1 下载

wget https://github.com/GrahamDumpleton/mod_wsgi/archive/refs/tags/5.0.0.zip

3.2 编译安装

unzip mod_wsgi-5.0.0.zip
cd mod_wsgi-5.0.0/
./configure
make
make install

4.问题记录

4.1 configure: error: Apache tool ‘apxs’ or ‘apxs2’ is required to build mod_wsgi.

编译mod_wsgi模块时候出现如下错误:

checking for apxs2... no
checking for apxs... no
configure: error: Apache tool 'apxs' or 'apxs2' is required to build mod_wsgi.

通过安装httpd-devel软件包解决:

rpm -ivh httpd-devel-2.4.62-1.aarch64.rpm

4.2 mod_systemd.c:31:31: fatal error: systemd/sd-daemon.h: No such file or directory

在编译mod_systemd.so动态链接库的时候出现如下错误:

apxs -i -a -c mod_systemd.c
/usr/lib64/apr/build-1/libtool --silent --mode=compile gcc -std=gnu11 -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1   -c -o mod_systemd.lo mod_systemd.c && touch mod_systemd.slo
mod_systemd.c:31:31: fatal error: systemd/sd-daemon.h: No such file or directory#include "systemd/sd-daemon.h"^
compilation terminated.
apxs:Error: Command failed with rc=65536
.
(khatch-ui)[root@controller1 unix]# ls
config5.m4  Makefile.in  mod_privileges.c  mod_systemd.c  mod_unixd.c  mod_unixd.h
(khatch-ui)[root@controller1 unix]# make
make: *** No targets specified and no makefile found.  Stop.
(khatch-ui)[root@controller1 unix]# apxs -i -a -c mod_systemd.c
/usr/lib64/apr/build-1/libtool --silent --mode=compile gcc -std=gnu11 -prefer-pic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches  -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd  -I/usr/include/apr-1   -I/usr/include/apr-1   -c -o mod_systemd.lo mod_systemd.c && touch mod_systemd.slo
mod_systemd.c:31:31: fatal error: systemd/sd-daemon.h: No such file or directory#include "systemd/sd-daemon.h"^
compilation terminated.
apxs:Error: Command failed with rc=65536
.

由于缺少system开发库导致的,解决方法通过安装systemd开发包解决:

yum install systemd-devel
http://www.lryc.cn/news/416753.html

相关文章:

  • Linux系统下的日志管理与ELK Stack实践
  • C++入门基础知识
  • Python爬虫技术 第28节 数据可视化
  • react中的装饰器
  • Elasticsearch:用例、架构和 6 个最佳实践
  • tcp常用网络接口 linux环境
  • 第10节课:JavaScript基础——网页交互的魔法
  • springboot+vue+mybatis汽车租赁管理+PPT+论文+讲解+售后
  • .NET C# 将文件夹压缩至 zip
  • 软考基本介绍
  • 【Vue】vue3 中使用 ResizeObserver 监听元素的尺寸宽度变化
  • 信息安全专业好吗?
  • 梧桐数据库(WuTongDB):数据库中元数据表的常见信息
  • 在 Linux 9 上安装 Oracle 19c:克服兼容性问题 (INS-08101)
  • 【踩坑】pytorch中的索引与copy_结合不会复制数据及其解决方案
  • 十六、【Python】基础教程 - 【Flask】网络编程开发
  • C#初级——List 容器
  • serial靶机教程
  • 【Linux-MISC设备】
  • 【随笔】VRRP+MSTP
  • vue 动态增删行,并form表单校验(附v2\v3)
  • 计算机网络的基本概念
  • Python 爬虫项目实战三:GitHub 用户信息抓取与分析
  • xtrabackup搭建MySQL 8.0 主从复制
  • Java程序员接单分享
  • 【HarmonyOS NEXT星河版开发学习】小型测试案例01-今日头条置顶练习
  • C语言----计算开机时间
  • 批发行业进销存-登录适配 android 横竖屏幕 源码CyberWinApp-SAAS 本地化及未来之窗行业应用跨平台架构
  • js功能(1)
  • 微信小程序乡村医疗系统,源码、部署+讲解