deb http://deb.debian.org/debian/ bullseye main contrib non-freedeb-src http://deb.debian.org/debian/ bullseye main contrib non-freedeb http://deb.debian.org/debian/ bullseye-updates main contrib non-freedeb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-freedeb http://security.debian.org/debian-security bullseye-security main contrib non-freedeb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
问题描述: 在运行 ./configure 或 make 时,出现类似“fatal error: some_header.h: No such file or directory”或“cannot find -l_some_library”的错误。 解决方案: 这通常意味着缺少必要的开发库。请确保您已运行 sudo apt-get build-dep freeswitch -y。如果仍然出现问题,您可能需要手动安装缺失的开发包。通常,缺少 libsomething 会导致缺少 libsomething-dev 包。例如,如果缺少 libjpeg.h,则需要安装 libjpeg-dev。
您可以使用 apt search 来查找相关的开发包。
7.2 bootstrap.sh 错误
问题描述: 运行 ./bootstrap.sh -j 时报错,或者在 make 阶段出现奇怪的错误。 解决方案: 尝试移除 -j 参数,即只运行 ./bootstrap.sh。-j 参数会并行执行任务,但在某些系统或特定环境下可能导致竞态条件或资源问题。如果移除 -j 后问题解决,说明是并行编译导致的问题。
7.3 make 编译中断或失败
问题描述: make 过程中断,提示内存不足或 CPU 占用过高。 解决方案: 编译 FreeSWITCH 是一个资源密集型任务。如果您的系统资源有限,可以尝试减少 make -j 后面的数字(例如 make -j2 或 make -j1),或者在编译时关闭其他占用资源的应用程序。增加系统的 SWAP 空间也可能有所帮助。
7.4 FreeSWITCH 无法启动或报错