感谢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. MFC 程序以管理员权限运行

    首先,VS打开项目的属性 然后设置如图: 转载自:http://www.cnblogs.com/zzuhjf/archive/2012/09/12/2681548.html

  2. SqlServer事务回滚(2)

    SQL Server 2008中SQL应用系列--目录索引 SQL事务 一.事务概念    事务是一种机制.是一种操作序列,它包含了一组数据库操作命令,这组命令要么全部执行,要么全部不执行.因此事务是 ...

  3. ccc pool

    var sp = new _ccsg.Sprite("a.png"); this.addChild(sp); cc.pool.putInPool(sp); cc.pool.getF ...

  4. Window.location

    1.location 对象 // 假设当前url是 http://localhost/rpc/plugin.php#hash?a=aaa&b=bbb alert(window.location ...

  5. Colorado Potato Beetle(CF的某道) & 鬼畜宽搜

    题意: 一个人在一张大图上走,给你路径与起点,求他走出的矩形面积并.(大概这个意思自行百度标题... SOL: 与其说这是一道图论题不如说是一道生动活泼的STL-vector教学.... 离散化宽搜, ...

  6. Coder-Strike 2014 - Round 1 B. Network Configuration

    题目的意思就是给每台电脑的最大传输速度,可以限制每台电脑的最大速度,然后选择k台电脑,使这k台电脑有相同的速度,且这个速度最大 典型的贪心算法,电脑的速度排个序,选择第k大速度即可 #include ...

  7. ACM 字符串替换

    字符串替换 时间限制:3000 ms  |  内存限制:65535 KB 难度:2   描述 编写一个程序实现将字符串中的所有"you"替换成"we"   输入 ...

  8. Jquery表格变色 复选框全选,反选

    /*jquery静态表格变色*/ $(".tr2").mouseover(function(){ $(this).css("background"," ...

  9. Android -- 自定义ProgressBar图片

    注:所有的进度条都要配置 android:indeterminate="false"        android:indeterminateDrawable="样式文件 ...

  10. nodejs模仿http请求组件nodegrass简单例子

    1.搭建nodejs环境. 2.执行npm install nodegrass命令. 3.引入模块,var ng= require(nodegrass); 4.下面先看nodegrass底层的get方 ...