感谢Anker分享:error while loading shared libraries: xxx.so.x" 错误的原因和解决办法

今天在装thrift的时候遇到一个这样的问题:

root@ubuntu:/home/wasdns/thrift# thrift -version
thrift: error while loading shared libraries: libthriftc.so.0: cannot open shared object file: No such file or directory

找到了开头给出链接的文章,给出了这一类问题的原因和三种解决方法:

一般我们在Linux下执行某些外部程序的时候可能会提示找不到共享库的错误, 比如:

tmux: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory

原因一般有两个, 一个是操作系统里确实没有包含该共享库(lib.so.文件)或者共享库版本不对, 遇到这种情况那就去网上下载并安装上即可.

另外一个原因就是已经安装了该共享库, 但执行需要调用该共享库的程序的时候, 程序按照默认共享库路径找不到该共享库文件.

所以,我先来到/usr/local/lib目录下,寻找错误提示中的libthriftc.so.0文件,发现了它。于是只要按照文章中的第二种解决方法,将路径添加到/etc/ld.so.conf即可。

具体解决命令如下:

root@ubuntu:/home/wasdns/thrift# cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf root@ubuntu:/home/wasdns/thrift# echo "/usr/local/lib" >> /etc/ld.so.conf
root@ubuntu:/home/wasdns/thrift# cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf /usr/local/lib
root@ubuntu:/home/wasdns/thrift# ldconfig
root@ubuntu:/home/wasdns/thrift# thrift -version
Thrift version 1.0.0-dev

如遇到相关问题,建议参考开头链接!

2016/12/17

解决thrift: ···No such file or directory问题的更多相关文章

  1. 今天又学了一招,牛逼!!!解决"-bash:No such file or directory"问题

    今天在64服务器上:发现好像bash 坏了,用户名前边   用-bash 显示,,前几天就发现这个问题,,,但是当时忙没有解决,,,,,今天来看看到底是怎么回事! File Exists but... ...

  2. 错误解决:error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

    执行以下代码,生成唯一的UID $fp = popen("/xxx/bin/tools/uuidgen system", "r");// $uid = frea ...

  3. bin/sh^M: bad interpreter: No such file or directory解决

    问题:bin/sh^M: bad interpreter: No such file or directory 原因:.sh脚本在windows系统下用记事本文件编写的.不同系统的编码格式引起的. 解 ...

  4. 解决openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory错误

    问题 在Centos7上编译安装openssl后,运行openssl version出现如下错误: openssl: error while loading shared libraries: lib ...

  5. 64位Ubuntu运行32位程序时报文件不存在(No such file or Directory)的一种解决办法

    尝试在64位Ubuntu下面运行32位程序时, 一直说 文件不存在(No such file or directory), 我只想说++. 你tm说个文件格式不正确不就好了? 非得说个文件不存在! 真 ...

  6. 解决clang: error: no such file or directory: such file or directory:的问题

    一,详细问题描述 clang: error: no such file or directory: 'xxx/src/GGBaCollectionViewCell.m' clang: error: n ...

  7. ubuntu解决libstdc++.so.6: cannot open shared object file: No such file or directory:问题

    解决libstdc++.so.6: cannot open shared object file: No such file or directory:原因在于,在13.10 版本中,ia32_lib ...

  8. Nginx 报错: nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory) 的解决方法

    今天测试域名访问不了,登陆 Linux(Ubuntu)重启Nginx: nginx -s reload 结果报错: nginx: [error] open() : No such file or di ...

  9. ubuntu 64bit arm-linux-gcc: No such file or directory 解决

    通过下面这个解决 ubuntu 64bit  arm-linux-gcc: No such file or directory 安装 sudo apt-get install lsb-core解决 h ...

随机推荐

  1. js简版图片左右切换功能

    function leftMove(obj,direction,lis){ var num = 0; var liWidth = lis[0].offsetWidth; setInterval(fun ...

  2. hdu 1520 Anniversary party 基础树dp

    Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission( ...

  3. Rectangle(csu)

    Description Now ,there are some rectangles. The area of these rectangles is 1* x or 2 * x ,and now y ...

  4. Mac 自带 apache

    1.启动服务器 sudo apachectl start http://localhost   能访问就ok sudo apachectl stop sudo apachectl restart ht ...

  5. POJ2135 Farm Tour(最小费用最大流)

    题目问的是从1到n再回到1边不重复走的最短路,本质是找1到n的两条路径不重复的尽量短的路. #include<cstdio> #include<cstring> #includ ...

  6. R AnalyticFlow---R的流程图

    0.简介 R AnalyticFlow是一款利用R环境作为统计计算的数据分析软件,创作者是日本人,版权属于日本Ef-prime公司.R AnalyticFlow除了拥有直观的用户界面和流程图显示,它还 ...

  7. nginx负载均衡之基于客户端cookie的会话保持

    通过ip_hash做会话保持有一定的缺陷,这个是通过客户端ip来实现.同一个网络下众多客户端访问服务器会被扔到同一台机器,再或者是CDN也 会导致负载不均衡.所以要实现通过客户端cookie实现,包括 ...

  8. Web标准中用于改善Web应用程序性能的各种方法总结

    提起Web应用程序中的性能改善,广大开发者们可能会想到JavaScript与DOM访问等基于各种既存技术的性能改善方法.最近,各种性能改善方法被汇总成为一个Web标准. 本文对Web标准中所包含的各种 ...

  9. POJ 2955 Brackets(区间DP)

    题目链接 #include <iostream> #include <cstdio> #include <cstring> #include <vector& ...

  10. Setting start page of Windows Phone dynamically through code

    Essentially this one line of code will set the start page of the application. var navTo = new Uri(&q ...