Linux 下的hiredis的简单安装、测试这个章节中,我为了解决error while loading shared libraries: libhiredis.so.0.13: cannot open shared object file: No such file or directory(动态库无法加载)的问题,提出以下解决方法:

1、在/etc/ld.so.conf.d/目录下添加usr-libs.conf文件:vim /etc/ld.so.conf.d/usr-libs.conf

2、在文件中添加内容:/usr/local/lib

3、退出文本编译::wq

4、更新动态库配置:/sbin/ldconfig

之后我的centos6.3的系统出现无法进入到登陆界面的问题(电脑一直卡在登陆界面之前,没有出现输入密码的界面),经过一些调查,发现只要在ld.so.conf.d中添加/usr/local/lib就会出现无法登陆界面的问题(感觉就像是/usr/local/lib里面太多库,让centos解析不过来了,我自己瞎猜的,暂时还不知道具体是什么原理),那么退而求其次:hiredis编译安装出来的三个文件:

libhiredis.a

libhiredis.so

libhiredis.so.0.13

这些文件是经过make install命令生成到/usr/local/lib目录中的,将这三个文件拷贝到一个新建的文件夹hiredis里面(新建hiredis文件夹的指令:mkdir hiredis

Linux centos 不能进入登陆界面

,然后执行以下操作:

1、在/etc/ld.so.conf.d/目录下添加usr-libs.conf文件:vim /etc/ld.so.conf.d/usr-libs.conf

2、在文件中添加内容:/usr/local/lib/hiredis

3、退出文本编译::wq

4、更新动态库配置:/sbin/ldconfig

这样就可以让程序运行了,并且重启centos之后,也没有出现不能进入登录界面的情况

相关文章:

  • 2022-02-07
  • 2022-12-23
  • 2021-05-05
  • 2021-07-01
  • 2021-07-02
  • 2021-08-12
  • 2022-03-07
  • 2021-12-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2022-01-21
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案