ffmpeg 编译错误 nasm/yasm not found or too old

Linux 2020-07-19 阅读 7 评论 0

问题描述

在 Linux/Unix 中,使用源码编译 ffmpeg。运行以下命令。

$ git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
$ cd ffmpeg
$ ./configure --prefix=/opt/ffmpeg
nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.

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.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

解决方法

需要安装 nasm 或者 yasm。

Mac OS

brew install nasm

Ubuntu/Debian

安装 nasm

sudo apt install nasm

安装 yasm

sudo apt install yasm

RHEL/CentOS

安装 nasm

sudo yum install nasm

或者前往 https://pkgs.org/search/?q=yasm,下载与操作系统相对应的 yasm,比如 x86_64 的 centos 8:

$ wget http://mirror.centos.org/centos/8/PowerTools/x86_64/os/Packages/yasm-1.3.0-7.el8.x86_64.rpm
$ sudo yum install ./yasm-1.3.0-7.el8.x86_64.rpm
最后更新 2020-07-19