如何安装 mkclean?

如何安装 mkclean?

从此链接下载 tar 文件。

> wget https://sourceforge.net/projects/matroska/files/mkvalidator/mkvalidator-0.5.2.tar.bz2/download

使用 tar 解压缩档案。

> tar -xjf ./download

我进入该目录。

> ./mkvalidator-0.5-2

我执行 shell 脚本。

> ./configure
: not found: 2: ./configure:
: No such file or directory.  Stop.
mv: cannot stat 'corec/tools/coremake/coremake': No such file or directory
: not found: 6: ./configure:
Running ./coremake gcc_linux_x64
.build' build file not found!r-0.5.2/corec/tools/coremake/gcc_linux_x64
: not found: 9: ./configure:
Now you can run make -C mkvalidator or gmake -C mkvalidator

我得到了以下结果。

我不知道该如何继续下去。

答案1

这个问题的解决办法很简单,我发现他们有点捣鼓。

错误在于您必须在 mkvalidator 或 mkclean 文件夹外部执行该文件夹内的 shell 脚本 ./configure 文件。

> ./mkvalidator-0.5-2
❯ ./mkvalidator/configure
./mkvalidator/configure: 2: ./mkvalidator/configure: %%BEGIN: not found
./mkvalidator/configure: 3: ./mkvalidator/configure: SCRIPT: not found
./mkvalidator/configure: 4: ./mkvalidator/configure: %%END: not found
mv: cannot stat 'corec/tools/coremake/coremake': No such file or directory
Running ./coremake gcc_linux_x64
Now you can run make -C %(PROJECT_NAME) or gmake -C %(PROJECT_NAME)

我得到了以下结果。

然后执行前面脚本的结果给出的指令。

> make -C mkvalidator

最后,要将编译后的可执行文件添加到路径中,只需将以下几行添加到 ~/.bashrc 或 ~/.zshrc

export MKVALIDATOR="$HOME/mkvalidator/release/gcc_linux_x64"
export PATH="$MKVALIDATOR:$PATH"
> source ~/.bashrc
> mkvalidator
mkvalidator v0.5.2, Copyright (c) 2010-2015 Matroska Foundation
ERR001: Usage: mkvalidator [options] <matroska_src>
Options:
  --no-warn   only output errors, no warnings
  --live      only output errors/warnings relevant to live streams
  --details   show details for valid files
  --divx      assume the file is using DivX specific extensions
  --quick     exit after the first error or warning
  --quiet     don't ouput progress and file info
  --version   show the version of mkvalidator
  --help      show this screen
        file "" 

相关内容