LibraHp / GetQzonehistory

获取QQ空间发布的历史说说
GNU General Public License v3.0
2.36k stars 196 forks source link

无法找到 zbar 共享库。请确保安装了 zbar。 #23

Closed zn917 closed 3 weeks ago

zn917 commented 1 month ago

PS D:\Dowload\GetQzonehistory-main\GetQzonehistory-main> python main.py 无法找到 zbar 共享库。请确保安装了 zbar。 有关更多安装指南,请参考 zbar 的官方文档或您的发行版文档。

我安装了... 还从官网下载安装了一个。。 用不了

DawnLilangs commented 1 month ago

我也遇到这个问题,你最后是如何解决的?

la02w commented 1 month ago

11 sudo apt install libzbar0

dousha commented 1 month ago

If you are using macOS, install zbar using homebrew first, and then link the library into the project:

  1. brew install zbar
  2. mkdir lib
  3. ln -s $(brew --prefix zbar)/lib/libzbar.dylib ./lib/libzbar.dylib

See this issue for more detail

iamshiqing commented 1 month ago

我也是这个问题,你们解决了吗

whliao5am commented 1 month ago

If you are using macOS, install zbar using homebrew first, and then link the library into the project:

  1. brew install zbar
  2. mkdir lib
  3. ln -s $(brew --prefix zbar)/lib/libzbar.dylib ./lib/libzbar.dylib

See this issue for more detail

Still does not work for MacOS 14.6.1

whliao5am commented 1 month ago

If you are using macOS, install zbar using homebrew first, and then link the library into the project:

  1. brew install zbar
  2. mkdir lib
  3. ln -s $(brew --prefix zbar)/lib/libzbar.dylib ./lib/libzbar.dylib

See this issue for more detail

我通过brew install zbararch -arm64 brew install zbar分别尝试过安装zbar,但是都还是报错。 后面我手动开脚本'from pyzbar.pyzbar import decode',提示报错信息是:

    libzbar = cdll.LoadLibrary(path)
  File "/opt/anaconda3/lib/python3.9/ctypes/__init__.py", line 460, in LoadLibrary
    return self._dlltype(name)
  File "/opt/anaconda3/lib/python3.9/ctypes/__init__.py", line 382, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/lwh/lib/libzbar.dylib, 0x0006): tried: '/Users/lwh/lib/libzbar.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/lwh/lib/libzbar.dylib' (no such file), '/Users/lwh/lib/libzbar.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/opt/homebrew/Cellar/zbar/0.23.93/lib/libzbar.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/zbar/0.23.93/lib/libzbar.0.dylib' (no such file), '/opt/homebrew/Cellar/zbar/0.23.93/lib/libzbar.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

其中'/opt/homebrew/Cellar/zbar/0.23.93/lib/libzbar.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'),感觉是zbar的arm和x86各种不兼容的问题,作者是否可以验证一下arm下可替换的其他函数或者decode方法。

Misery-H commented 1 month ago

you will most likely need the Visual C++ Redistributable Packages for Visual Studio 2013. Install vcredist_x64.exe if using 64-bit Python, vcredist_x86.exe if using 32-bit Python.

Zixiaobowen commented 1 month ago

If you are using macOS, install zbar using homebrew first, and then link the library into the project:

  1. brew install zbar
  2. mkdir lib
  3. ln -s $(brew --prefix zbar)/lib/libzbar.dylib ./lib/libzbar.dylib

See this issue for more detail

It's work!

is-xianglei commented 1 month ago

我也遇到了这个问题,我是 M1 芯片,OS 版本为14.6 请问有人解决了吗

sgr997 commented 1 month ago

我也遇到了这个问题,我是 M1 芯片,OS 版本为14.6 请问有人解决了吗

俺也一样,解决了麻烦踢我一下😄

GladiousZhang commented 1 month ago

you will most likely need the Visual C++ Redistributable Packages for Visual Studio 2013. Install vcredist_x64.exe if using 64-bit Python, vcredist_x86.exe if using 32-bit Python.

That actually works for my problem. My environment is Windows 11 with Python 3.12.3.

kingcanfish commented 1 month ago

我也遇到了这个问题,我是 M1 芯片,OS 版本为14.6 请问有人解决了吗

俺也一样,解决了麻烦踢我一下😄

brew install 之后 终端直接 export DYLD_LIBRARY_PATH="$(brew --prefix)/lib:$DYLD_LIBRARY_PATH" 就行 然后跑脚本

GWillS163 commented 1 month ago

最后自己换了电脑,成功的,所以可以换个虚拟机什么的重试

GWillS163 commented 1 month ago

最后自己换了电脑,成功的,所以可以换个虚拟机什么的重试

@zn917 @DawnLilangs @iamshiqing

XkzkzXu commented 2 days ago

arm64,M1直接arch -arm64 brew install zbar就行,跑完成绿色就可以运行

Akihi11 commented 1 day ago

https://www.microsoft.com/zh-cn/download/details.aspx?id=40784 下个这个就行了

zhangyuanbo918 commented 1 day ago

我也遇到了这个问题,我是 M1 芯片,OS 版本为14.6 请问有人解决了吗

俺也一样,解决了麻烦踢我一下😄

brew install 之后 终端直接 export DYLD_LIBRARY_PATH="$(brew --prefix)/lib:$DYLD_LIBRARY_PATH" 就行 然后跑脚本

good job

zn917 commented 1 day ago

缺个vcredist_x64  楼上有人发下载链接 你看看

------------------ 原始邮件 ------------------ 发件人: "LibraHp/GetQzonehistory" @.>; 发送时间: 2024年11月7日(星期四) 下午4:09 @.>; @.**@.>; 主题: Re: [LibraHp/GetQzonehistory] 无法找到 zbar 共享库。请确保安装了 zbar。 (Issue #23)

我也遇到了这个问题,我是 M1 芯片,OS 版本为14.6 请问有人解决了吗

俺也一样,解决了麻烦踢我一下😄

brew install 之后 终端直接 export DYLD_LIBRARY_PATH="$(brew --prefix)/lib:$DYLD_LIBRARY_PATH" 就行 然后跑脚本

good job

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>