Linux ccache 工具的安装

时间:2021-03-27 08:55:36

Linux ccache 工具的安装

Linux 下编译FFmpeg时,会出现找不到ccache 命令的问题,本篇记录一下自己”./FFmpeg-Android.sh: line 121: ccache: command not found”时的解决方法。

  • ccache下载
  • 解压
  • 编译安装
  • 说明

ccache 下载

ccache 链接地址:http://ccache.samba.org/download.html

解压配置

tar -jxvf ccache-3.1.9.tar.bz2
cd ccache-3.1.9
vi configure 非root用户需要将ac_default_prefix默认地址
“/usr/local ”改成“/home/xxxxx/usr/local”,新地址为ccache
安装地址,root用户可以忽略
./configure

编译安装

make
make install

说明

通常linux 的工具在解压后,configure配置时会指定路径,通常是
prefix/PREFIX, 接着要将改路径添加到需要编译的模块上,也即添加到
编译脚本中的PATH中

CCACHE=/home/xxxxxx/usr/local/bin
export PATH=$TOOLCHAIN/bin:$PATH:$CCACHE

这样FFmpeg-Android.sh脚本中找不到ccache 的问题就解决了。