编译

sudo gcc -o sltest01 sltest01.c -L/usr/local/lib/ -lhiredis

运行

sudo ./sltest01

编译成功后运行报错信息:

./sltest01: error while loading shared libraries: libhiredis.so.0.13: cannot open shared object file: No such file or directory

libhiredis.so.0.13默认安装路径【/usr/local/lib】

动态库的问题,是系统找不到这个动态库,此时需要:

1、首先检查一下/etc/ld.so.conf文件中是否包含需要的动态库的目录(如/usr/local/lib),如果没有的话就添加进出;

2、执行sudo /sbin/ldconfig以下,更新一下系统动态库配置。

C++.Linux下redis编程:error while loading shared libraries: libhiredis.so.0.13的更多相关文章

  1. error while loading shared libraries: libudev.so.0 的问题

    在linux下运行koala的时候遇到了问题: 应该是缺少文件libudev.so.0 在/lib和/lib64目录下也都没有这个文件.然后网上找解决方案,在/lib/x86_64-linux-gnu ...

  2. svnadmin:error while loading shared libraries: libaprutil-1.so.0:cannot open shared object file: No such file or directory

    wdcp下安装svn后一直提示 svnadmin:error while loading shared libraries: libaprutil-1.so.0:cannot open shared ...

  3. 动态链接库找不到 : error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory

    问题: 运行gsl(GNU scientific Library)的函数库,用 gcc erf.c -I/usr/local/include -L/usr/local/lib64 -L/usr/loc ...

  4. error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file

    安装rac10g,出现例如以下错误: [root@rac2 oracle]# /u01/product/crs/root.sh WARNING: directory '/u01/product' is ...

  5. Nginx启动错误:error while loading shared libraries: libpcre.so.0

    今天测试的时候,启动一个其他机器预编译好的nginx到目标测试机器(OEL 7.4)启动的时候,报了下列错误: /usr/local/nginx/sbin/nginx: error while loa ...

  6. nginx检查报错 error while loading shared libraries: libprofiler.so.0: cannot open shared object file: No such file or directory

    在centos7.3上编译安装nginx-1.12.2 启动测试出错 [root@web02 local]# /usr/local/nginx/sbin/nginx -t /usr/local/ngi ...

  7. error while loading shared libraries: libpcre.so.0的解决办法

    error while loading shared libraries: libpcre.so.0的解决办法 http://blog.csdn.net/xjkwq1qq/article/detail ...

  8. ./filezilla: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

    opensuse系统 在filezilla官网下载压缩文件解压运行后报 ./filezilla: error while loading shared libraries: libpng12.so.0 ...

  9. linux - python - 异常:error while loading shared libraries

    问题描述 error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No s ...

随机推荐

  1. android项目结构

  2. wordpress安装主题时提示无法创建目录

    直接上解决办法: 找到wp-content文件夹(我的是在/home/wwwroot/default/wp-cotent) 首先给wp-content这个文件夹一个权限 chmod -R 775 wp ...

  3. 一张纸,折多少次和珠穆拉峰一样高(for if 和break)

  4. Java基础100 待续

    1.待续 原创作者:DSHORE 作者主页:http://www.cnblogs.com/dshore123/ 原文出自:https://www.cnblogs.com/dshore123/p/107 ...

  5. 【linux】tcpdump抓包

    tcpdump -i eth0 host 192.168.11.22 -w ./target.cap 上面指令,抓取eth0中与192.168.11.22相关的流量,保存到target.cap中

  6. easyUI基础入门

    头部需要引人文件:<!DOCTYPE html><html><head> <meta charset="utf-8"> <ti ...

  7. 基于struts研究传值问题

    一.新建项目 struts 1.file——>new——>Web Project——>取名struts——>finsh——>将之前项目下的jar包copy到该项目下 2. ...

  8. Android APN

    https://www.cnblogs.com/sishuiliuyun/p/3754516.html android系统把所有的APN都保存在数据库中,数据库绝对路径:/data/data/com. ...

  9. PTA之多项式求值

    时间限制: 400ms 内存限制: 64MB 代码长度限制: 16KB 函数接口定义: double f( int n, double a[], double x ); 其中n是多项式的阶数,a[]中 ...

  10. Unity 之 rawimage 与image 的区别

    http://www.newbieol.com/information/740.html