惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Hacker News
The Hacker News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
小众软件
小众软件
云风的 BLOG
云风的 BLOG
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 聂微东
L
LangChain Blog
博客园 - 司徒正美
腾讯CDC
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
M
MIT News - Artificial intelligence
Y
Y Combinator Blog
S
Schneier on Security
T
Tailwind CSS Blog
S
Securelist
P
Proofpoint News Feed
A
Arctic Wolf
有赞技术团队
有赞技术团队
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Privacy & Cybersecurity Law Blog
爱范儿
爱范儿
G
GRAHAM CLULEY
F
Full Disclosure
T
Threat Research - Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
T
Tor Project blog
T
Threatpost
月光博客
月光博客
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CXSECURITY Database RSS Feed - CXSecurity.com
AWS News Blog
AWS News Blog
C
CERT Recently Published Vulnerability Notes
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
Simon Willison's Weblog
Simon Willison's Weblog
Microsoft Security Blog
Microsoft Security Blog
雷峰网
雷峰网
I
Intezer
GbyAI
GbyAI
T
The Exploit Database - CXSecurity.com
L
LINUX DO - 热门话题
J
Java Code Geeks
I
InfoQ
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
罗磊的独立博客

博客园 - calmzeal

微软更新导致的IIS7设置默认主页无效 【原创】Superset在windows下的安装配置 记录一次服务器CPU 100%的解决过程 Google Review中Zlib.Portable报错的一种排查解决方案 sql行转列 VS2010发布.NET2.0网站,出现“未预编译文件* 因此不能请求该文件”的解决办法 在 64 位版本的 Windows 上IIS ASP NET不支持JET4 问题 wse [Web 开发] 定制IE下载对话框的按钮(打开/保存) 【IE信息栏问题】本地html文件js被IE阻止的一些解决方法 分享一个js Tree - dTree SqlPlus Set常用设置 OleDB Transaction ORA-01000: maximum open cursors exceeded 超出打开游标的最大数 【转】神呀~~,给我个"本地数据库的替换方案"吧! 【CLR Via C#笔记】操作符重载 C#单件模式 【CLR Via C#笔记】 类型对象 【CLR Via C#笔记】 值类型与拆装箱、参数传递 [转] CSS完美兼容IE6/IE7/FF的通用方法
解决 Linux error while loading shared libraries: cannot open shared object file: No such file or directory
calmzeal · 2017-03-20 · via 博客园 - calmzeal

安装最新版本Emqtt,参照官方文档安装后,执行报错:

Linux error while loading shared libraries libsctp.so.1: cannot open shared object file: No such file or directory 

从互联网上找到了一些文章, 解决了我的问题,这里整理贴一下,类似的问题应该都可以参照解决。

1.先在本地查找一下文件

命令:wheris libsctp.so.1

先查找一下本地是否存在文件,如果存在的话,直接跳到第三步,我这里的结果是找不到。

2.然后google 一下 下载libsctp

这个网站上有很多so文件下载: https://www.rpmfind.net/

https://www.rpmfind.net/linux/RPM/centos/6.8/x86_64/Packages/lksctp-tools-1.0.10-7.el6.i686.html

RPM安装,参照

http://www.centoscn.com/CentOS/help/2013/1019/1906.html

安装后wheris  libsctp.so.1

发现安装在usr/lib下面了。

再次运行 ./bin/emqttd consle,还是报错。

3.怀疑是环境变量 LD_LIBRARY_PATH的问题。

系统不知道xxx.so放在哪个目录下,这时候就要在/etc/ld.so.conf中加入xxx.so所在的目录。

一般而言,有很多的so会存放在/usr/local/lib这个目录底下,去这个目录底下找,果然发现自己所需要的.so文件。

所以,在/etc/ld.so.conf中加入/usr/local/lib这一行,保存之后,再运行:/sbin/ldconfig –v更新一下配置即可。

在我这里,rpm后,so文件安装在了/usr/lib下,这个目录下应该是不需要配置的。

需要配置的同学可以参见:

http://blog.csdn.net/sahusoft/article/details/7388617

在我这里,/sbin/ldconfig 更新后还是报错。不过错误信息变了:

 wrong ELF class: ELFCLASS32

4.查询后,发现应该是 32位,64位问题。我安装的Emqttd是64位版本。

使用命令

file /usr/lib64/libsctp.so.1 发现是个链接到 `libsctp.so.1.0.17'

file /usr/lib64/libsctp.so.1.0.17,发现是个32位的文件。

看起来是64位的Emqtt用不了32位的so文件。

5. 重新google libsctp的64位版本,rpm安装。安装之前先rpm -e 卸载原来的32位版本。

安装64位后,ldconfig 。再次运行,成功打开emqtt服务,问题解决。