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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
T
Threatpost
Latest news
Latest news
N
News | PayPal Newsroom
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
TaoSecurity Blog
TaoSecurity Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
T
Threat Research - Cisco Blogs
O
OpenAI News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Securelist
小众软件
小众软件
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Martin Fowler
Martin Fowler
S
SegmentFault 最新的问题
Cisco Talos Blog
Cisco Talos Blog
云风的 BLOG
云风的 BLOG
AWS News Blog
AWS News Blog
GbyAI
GbyAI
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
美团技术团队
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
博客园 - 聂微东
V2EX - 技术
V2EX - 技术
T
Troy Hunt's Blog
SecWiki News
SecWiki News
S
Secure Thoughts
B
Blog RSS Feed
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
腾讯CDC
H
Heimdal Security Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed

博客园 - CalvinChu

vyos syslog配置 How to upgrade pip on Debian Wheezy 指数数据解密,懂的都懂 OpenWRT and VPN Passthrough - CalvinChu 如何将 find 命令与 exec 一起使用 CentOS 7 下搭建 OpenVPN - CalvinChu How to get the ip ranges of domain esxi 直通sata控制器 Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_P xRDP – Detected issues with Debian 11 – Oh No ! Something has gone wrong…. qemu-mips环境搭建跳坑指南 openwrt(lede)中,PPtP Client需要安装的软件包 OpenWrt中的Hotplug脚本 MAC OSX VPN自动添加静态路由 - CalvinChu fbprophet安装和使用 CentOS7安装iptables防火墙 CENTOS7下安装REDIS mysql忘记root密码解决办法 iptables命令(备忘)
ImportError: libSM.so.6: cannot open shared object file: No such file or directory
CalvinChu · 2021-04-08 · via 博客园 - CalvinChu

在centos中使用opencv-python。在进行导入的时候报出如下错误

>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/python3/lib/python3.6/site-packages/cv2/__init__.py", line 3, in <module>
from .cv2 import *
ImportError: libSM.so.6: cannot open shared object file: No such file or directory

主要原因时系统缺少libSM.so.6库文件。
可以使用如下命令查找包含此库的文件

yum whatprovides libSM.so.6


显示如下

Loaded plugins: fastestmirror, ovl
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Determining fastest mirrors
* base: mirrors.bfsu.edu.cn
* epel: repo.ugm.ac.id
* extras: mirrors.bfsu.edu.cn
* updates: mirror.bit.edu.cn
libSM-1.2.2-2.el7.i686 : X.Org X11 SM runtime library
Repo : base
Matched from:
Provides : libSM.so.6

说明只要安装libSM-1.2.2-2.el7.i686文件就行
如果系统时64位需要把i686改成x86_64
如下

yum install libSM-1.2.2-2.el7.x86_64 --setopt=protected_multilib=false

如果缺少其他库一样方法安装就行。