Linux 即使我已经安装了它也找不到 yasm

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10492178/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 06:13:19  来源:igfitidea点击:

Cannot find yasm even though I have installed it

linuxx264yasm

提问by zhen lee

I got a strange problem. I tried to install x264. When run sudo ./configure --enable-shared, it gave:

我遇到了一个奇怪的问题。我尝试安装 x264。当运行 sudo ./configure --enable-shared 时,它给出了:

Found no assembler Minimum version is yasm-0.7.0 If you really want to compile without asm, configure with --disable-asm.

找不到汇编器 最低版本是 yasm-0.7.0 如果你真的想不用asm编译,配置--disable-asm。

But I already installed yasm-0.7.0 ,to prove that ,i run yasm --version,it gave:

但是我已经安装了 yasm-0.7.0 ,为了证明,我运行 yasm --version,它给出了:

*yasm 0.7.0.2066 Compiled on May 8 2012. Copyright (c) 2001-2008 Peter Johnson and other Yasm developers. Run yasm --license for licensing overview and summary.*

* yasm 0.7.0.2066 2012 年 5 月 8 日编译。版权所有 (c) 2001-2008 Peter Johnson 和其他 Yasm 开发人员。运行 yasm --license 以获得许可概述和摘要。*

I install yasm to /usr/local/yasm, Why can it not find yasm?

我安装yasm到/usr/local/yasm,为什么找不到yasm?

回答by toolchainX

Maybe you should rebuild the yasm for the correct path /usr/bin/yasm.

也许您应该为正确的路径 /usr/bin/yasm 重建 yasm。

回答by Catskul

sudoignores your PATHenvironment variable and uses its own.

sudo忽略您的PATH环境变量并使用它自己的。

compare:

相比:

$ which yasm
/usr/local/bin/yasm

with:

和:

$ sudo which yasm
/usr/bin/yasm

To solve, do:

要解决,请执行以下操作:

$ sudo PATH=$PATH:/usr/local/bin which yasm
/usr/local/bin/yasm

or rather

更确切地说

$ sudo PATH=$PATH:/usr/local/bin ./configure --enable-shared

回答by curious_beast

If you are running Ubuntu and if "which yasm " results in nothing Please try out the below mentioned command for building the x64....

如果您正在运行 Ubuntu 并且“which yasm”没有结果请尝试下面提到的用于构建 x64 的命令....

sudo apt-get install yasm

sudo apt-get 安装 yasm

回答by chaoyuan899

The error message means that you have an old version of yasm on your system, so you should update it! see here: https://trac.ffmpeg.org/wiki/CompilationGuide/Quick/libx264

该错误消息意味着您的系统上有旧版本的 yasm,因此您应该更新它!见这里:https: //trac.ffmpeg.org/wiki/CompilationGuide/Quick/libx264

回答by Serj Zaharchenko

Just in case of someone got here from Google, looking for a recent solution.

以防万一有人从谷歌来到这里,寻找最近的解决方案。

Recent versions of x264 moved from yasm to nasm, hence breaking some FFMPEG install scripts or tutorials. To check if it is the case, look at the output. If it reads

x264 的最新版本从 yasm 移动到 nasm,因此破坏了一些 FFMPEG 安装脚本或教程。要检查是否是这种情况,请查看输出。如果它读

Minimum version is nasm-2.13

then you are to install nasm. In Ubuntu 16.04 repos there's nasm 2.11; so you'll have to build from sources, following official instruction http://www.linuxfromscratch.org/blfs/view/svn/general/nasm.html.

然后你要安装nasm。在 Ubuntu 16.04 存储库中有 nasm 2.11;所以你必须按照官方说明http://www.linuxfromscratch.org/blfs/view/svn/general/nasm.html从源代码构建。