• Linux缺少动态连接库.so--cannot open shared object file: No such file or directory


    1 Liunx安装报错时,缺少动态链接库时,形式如下:

    /usr/local/libexec/gcc/x86_64-unknown-liunx-gnu/4.8.2/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory


    那就表示Linux系統不知道libmpc.so.2 放在哪个目录下。

    2  一般而言,有很多so文件会在/usr/local/lib or /usr/lib 目录下,现在改目录找到 libmpc.so.2

    3 在 /etc/ld.so.conf 中加入/usr/local/lib 这一行 ,将 /etc/ld.so.conf 保存后;

    4 执行【/sbin/ldconfig –v 】命里更新一下才生效 ,然后在执行其他按装命令;

    PS 若没有看到 libmpc.so.2的文件,说明这是个链接文件,需要创建一个,于是进入libmpc.so.2.0.0所在目录i386-linux-gnu创建链接文件;
    root@Nikola :/usr/lib# ln -s libmpc.so.2.0.0 libmpc.so.2
    创建成功,然后重新编译zlib,OK

    也可以参考 :

    https://www.cnblogs.com/amboyna/archive/2008/02/06/1065322.html

    https://www.cnblogs.com/smartvessel/archive/2011/01/21/1940868.html

  • 相关阅读:
    Git 操作
    SVN
    一维数组
    常见的数学方法
    常用事件
    function函数
    while;do while; for循环
    JS中的变量提升
    关于js的单双引号嵌套问题
    db.collection is not a function
  • 原文地址:https://www.cnblogs.com/fanblogs/p/11141403.html
Copyright © 2020-2023  润新知