Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

在CentOS8环境中LoginByQrCode获取二维码报错 #57

Closed
CHKZL opened this issue Nov 16, 2020 · 3 comments
Closed

在CentOS8环境中LoginByQrCode获取二维码报错 #57

CHKZL opened this issue Nov 16, 2020 · 3 comments
Labels
information This issue notices some information may be useful.

Comments

@CHKZL
Copy link

CHKZL commented Nov 16, 2020

2.5.1.23版本
在CentOS8环境中,调用LoginByQrCode获取二维码时
依赖框架3.1运行时报错:
Unhandled exception. System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibgdiplus: cannot open shared object file: No such file or directory
at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(Int32 width, Int32 height, Int32 stride, Int32 format, IntPtr scan0, IntPtr& bitmap)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at QRCoder.QRCode.GetGraphic(Int32 pixelsPerModule, Color darkColor, Color lightColor, Bitmap icon, Int32 iconSizePercent, Int32 iconBorderWidth, Boolean drawQuietZones)
at BiliAccount.Core.ByQRCode.GetQrcode(Color Foreground, Color Background, Boolean IsBorderVisable)
at BiliAccount.Linq.ByQRCode.LoginByQrCode(Color Foreground, Color Background, Boolean IsBorderVisable)
at BiliAccount.Linq.ByQRCode.LoginByQrCode(String strForeground, String strBackground, Boolean IsBorderVisable)

@LeoChen98
Copy link
Owner

CentOS8环境需要手动安装 libgdiplus

@LeoChen98 LeoChen98 added the information This issue notices some information may be useful. label Nov 16, 2020
@LeoChen98 LeoChen98 pinned this issue Nov 17, 2020
@luojunyuan
Copy link

Mac m1 遇上这个问题,并且编译过程中还找不到libpng16,make check也跑不过,详情 libgdiplus issue Build for Apple Silicon。最后切换到了windows

@LeoChen98
Copy link
Owner

建议使用2.5.5.27(或更新)版本下Linq.ByQRCode.LoginByQrCodeUrl方法,然后监听Linq.ByQRCode.QrCodeUrlRefreshLinq.ByQRCode.QrCodeStatus_Changed处理刷新和登录事件。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
information This issue notices some information may be useful.
Projects
None yet
Development

No branches or pull requests

3 participants