centos 9 编译安装 rtpengine (快方式)-使用 debian12 系统自带

1:更新系统包

dnf update

2:启用EPEL仓库(提供额外软件包)

# 安装EPEL仓库
sudo dnf install epel-release -y

# 检查EPEL仓库是否启用(输出应包含epel)
dnf repolist

# 启用CRB仓库
sudo dnf config-manager --set-enabled crb

# 更新缓存
sudo dnf makecache

3:安装依赖包

dnf install -y openssl-devel libcurl-devel libevent-devel json-glib-devel 
libpcap-devel iptables-devel xmlrpc-c-devel  opus-devel spandsp-devel 
hiredis-devel iptables-devel  libwebsockets-devel libmnl-devel 
libnftnl-devel pandoc perl-Socket6 perl-Convert-Bencode gperf mysql-devel  



sudo yum install -y epel-release
sudo yum install -y https://download1.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm

# 安装 FFmpeg 开发包
sudo yum install -y ffmpeg-devel

sudo dnf install perl-IPC-Cmd

4:再次确认安装依赖包

sudo dnf install -y git gcc make autoconf automake libtool pkgconfig \
    glib2-devel openssl-devel libpcap-devel libevent-devel \
    iptables-devel libcurl-devel libwebsockets-devel hiredis-devel \
    spandsp-devel xmlrpc-c-devel opus-devel
# 下载并编译bcg729库
wget https://github.com/BelledonneCommunications/bcg729/archive/refs/tags/1.1.1.tar.gz
tar zxvf bcg729-1.1.1.tar.gz && cd bcg729-1.1.1
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make && make install
ldconfig  # 更新动态库缓存[2,3](@ref)

5:下载rtpengine

wget https://github.com/sipwise/rtpengine/archive/refs/tags/mr11.5.1.39.tar.gz

6:编译安装 rtpengine

tar -xvf mr13.2.1.1.tar.gz

cd rtpengine-mr13.2.1.1/

make with-kernel

7:错误信息

Package libiptc was not found in the pkg-config search path. Perhaps you should add the directory containing `libiptc.pc' to the PKG_CONFIG_PATH environment variable Package 'libiptc', required by 'virtual:world', not found

# 下载并编译 iptables 源码
wget https://www.netfilter.org/pub/iptables/iptables-1.8.9.tar.xz
cd iptables-1.8.9
./configure --prefix=/usr --libdir=/usr/lib64 --disable-nftables
make && sudo make install

main.c:2:10: fatal error: ncurses.h: No such file or directory
    2 | #include <ncurses.h>
      |          ^~~~~~~~~~~
compilation terminated.

sudo dnf install ncurses-devel

遇到无法解决的问题为:

进入内核转发 编辑报错 错误信息为:/home/soft/rtpengine-mr11.5.1.39/kernel-module/xt_RTPENGINE.c: In function ‘send_proxy_packet4’:
/home/soft/rtpengine-mr11.5.1.39/kernel-module/xt_RTPENGINE.c:4028:14: error: too few arguments to function ‘ip_route_output’
 4028 |         rt = ip_route_output(net, dst->u.ipv4, src->u.ipv4, tos, 0);
      |              ^~~~~~~~~~~~~~~
In file included from ./include/net/ip.h:29,
                 from ./include/net/ip6_checksum.h:27,
                 from /home/soft/rtpengine-mr11.5.1.39/kernel-module/xt_RTPENGINE.c:5:
./include/net/route.h:138:30: note: declared here
  138 | static inline struct rtable *ip_route_output(struct net *net, __be32 daddr,

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值