> 技术文档 > 【ERROR: x264 not found using pkg-config】

【ERROR: x264 not found using pkg-config】

ERROR: x264 not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file “ffbuild/config.log” produced by configure as this will help
solve the problem.

解决方法:
这个错误表明在编译或配置 FFmpeg 时,系统找不到 x264 库。x264 是一个开源的 H.264 视频编码器,FFmpeg 需要它来支持 H.264 编码功能。

以下是解决这个问题的步骤:


1. 确保安装了 x264 开发库

x264 的开发库(包括头文件和链接库)需要安装在系统中。你可以通过包管理器安装它:

  • Ubuntu/Debian:

    sudo apt updatesudo apt install libx264-dev