问题1
加载so库文件失败,原因是没有配置环境变量
解决方案:添加环境变量
1.修改/etc/profile文件,在文件尾部添加
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/software/back/HIK_ISUP_SDK/lib:/home/software/back/HIK_ISUP_SDK/lib/HCAapSDKCom
2.调用 source /etc/profile 命令使配置生效
3.修改/etc/ld.so.conf文件,在文件尾部添加
/home/software/back/HIK_ISUP_SDK/lib
/home/software/back/HIK_ISUP_SDK/lib/HCAapSDKCom
4.调用 ldconfig 命令使配置生效
问题2
报错信息:
java.lang.UnsatisfiedLinkError: Unable to load library '/home/software/back/HIK_ISUP_SDK/lib/libPlayCtrl.so': libGL.so.1: cannot open shared object file: No such file or directory
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:145)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:188)
at com.sun.jna.Library$Handler.<init>(Library.java:123)
at com.sun.jna.Native.loadLibrary(Native.java:255)
at com.sun.jna.Native.loadLibrary(Native.java:241)
at org.jeecg.modules.hik.device.isup.sdk.streamService.StreamService.createPlayInstance(StreamService.java:244)
at org.jeecg.modules.hik.device.isup.sdk.streamService.StreamService.streamInit(StreamService.java:68)
at org.jeecg.modules.hik.device.isup.basic.api.HikBasicApi.start(HikBasicApi.java:88)
at org.jeecg.modules.hik.device.application.listener.ApplicationReadyEventListener.onApplicationEvent(ApplicationReadyEventListener.java:21)
at org.jeecg.modules.hik.device.application.listener.ApplicationReadyEventListener.onApplicationEvent(ApplicationReadyEventListener.java:14)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361)
at org.springframework.boot.context.event.EventPublishingRunListener.running(EventPublishingRunListener.java:108)
at org.springframework.boot.SpringApplicationRunListeners.running(SpringApplicationRunListeners.java:77)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:330)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at org.jeecg.JeecgSystemApplication.main(JeecgSystemApplication.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
解决方案:安装mesa-libGL
yum install mesa-libGL -y
参考文章:
https://blog.csdn.net/qq_50195602/article/details/124188467