Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centos需要同时yum install zbar-devel #1

Open
SlightDust opened this issue Apr 3, 2022 · 2 comments
Open

centos需要同时yum install zbar-devel #1

SlightDust opened this issue Apr 3, 2022 · 2 comments

Comments

@SlightDust
Copy link

centos只pip3 install pyzbar的话会报错

1|yubao-hsn  |   File "/root/qqbot/HoshinoBot/hoshino/modules/hoshino-print-qrcode/main.py", line 6, in <module>
1|yubao-hsn  |     import pyzbar.pyzbar as pyzbar
1|yubao-hsn  |   File "/usr/local/lib/python3.8/site-packages/pyzbar/pyzbar.py", line 7, in <module>
1|yubao-hsn  |     from .wrapper import (
1|yubao-hsn  |   File "/usr/local/lib/python3.8/site-packages/pyzbar/wrapper.py", line 151, in <module>
1|yubao-hsn  |     zbar_version = zbar_function(
1|yubao-hsn  |   File "/usr/local/lib/python3.8/site-packages/pyzbar/wrapper.py", line 148, in zbar_function
1|yubao-hsn  |     return prototype((fname, load_libzbar()))
1|yubao-hsn  |   File "/usr/local/lib/python3.8/site-packages/pyzbar/wrapper.py", line 127, in load_libzbar
1|yubao-hsn  |     libzbar, dependencies = zbar_library.load()
1|yubao-hsn  |   File "/usr/local/lib/python3.8/site-packages/pyzbar/zbar_library.py", line 65, in load
1|yubao-hsn  |     raise ImportError('Unable to find zbar shared library')
1|yubao-hsn  | ImportError: Unable to find zbar shared library

再yum install zbar-devel就没问题了

在readme里提醒一下吧()

我知道是我的问题centos已经停止维护了我再也不用centos了我已经熟读并背诵下次一定选debian

@SlightDust
Copy link
Author

如果yum install zbar-devel出现报错Could not resolve host: mirrors.tencentyun.com; Unknown error的话那是因为根据gocq的提示,手动修改了dns地址导致无法解析这个腾讯云的内网域名。需要去/etc/yum.repos.d目录,换一个CentOS-Base.repo(百度cnetos7更换yum源),再把CentOS-Epel.repo里的所有http://mirrors.tencentyun.com/换成http://mirrors.cloud.tencent.com/,然后yum install zbar-devel

@SlightDust
Copy link
Author

centos √都不用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant