zoukankan      html  css  js  c++  java
  • ubuntu上编译安装x264

    1.安装yasm

    sudo apt-get install yasm

    2.安装git

    sudo apt-get install git

    3.安装x264

    git clone http://git.videolan.org/git/x264.git

    cd x264

    mkdir build && cd build
    
    ../configure --enable-shared
    
    make -j4
    
    sudo make install

    4.配置环境

        此时 libx264.so默认安装在/usr/local/lib,直接编译会出现
    tmux: error while loading shared libraries: libx264.so.2: cannot open shared object file: No such file or directory
    原因就是已经安装了该共享库, 但执行需要调用该共享库的程序的时候, 程序按照默认共享库路径 /usr/lib 找不到该共享库文件.
    如果共享库文件安装到了/usr/local/lib(很多开源的共享库都会安装到该目录下)或其它"非/lib或/usr/lib"目录下, 那么在执行
    ldconfig命令前, 还要把新共享库目录加入到共享库配置文件/etc/ld.so.conf中, 如下:

    su
    echo "/usr/local/lib" >> /etc/ld.so.conf
    ldconfig
  • 相关阅读:
    flyway
    xxl-job
    响应式布局
    position: fixed
    position: absolute
    position: relative
    GDB高级一点的命令
    坑爹的大页内存
    input8按键对照
    discuz插件应用原理分析
  • 原文地址:https://www.cnblogs.com/ziyu-trip/p/6783165.html
Copyright © 2011-2022 走看看