在我的 Raspberry 中安装 rxtx 包 [英] Installing rxtx bundle in my Raspberry

查看:21
本文介绍了在我的 Raspberry 中安装 rxtx 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的 Raspberry Pi 上安装一个 rxtx 包该包将在 KURA 平台上运行(Equinox 是 Kura 的 OSGi 容器)

I want to install an rxtx bundle on my Raspberry Pi the bundle will be running on KURA platform (Equinox is the OSGi container for Kura)

我使用以下方法安装了 rxtx 本机库:sudo apt-get install librxtx-java

I installed the rxtx native library using: sudo apt-get install librxtx-java

.so 安装在目录:/usr/lib/jni/

the .so was installed on the directory: /usr/lib/jni/

pi@raspberrypi /usr/lib/jni $ ls
librxtxI2C-2.2pre1.so       librxtxParallel.so     librxtxRS485-2.2pre1.so  librxtxSerial-2.2pre1.so
librxtxI2C.so               librxtxRaw-2.2pre1.so  librxtxRS485.so          librxtxSerial.so
librxtxParallel-2.2pre1.so  librxtxRaw.so  

然后我按照这个链接将 rxtx 库打包成一个包http://rxtx.qbang.org/wiki/index.php/Wrapping_RXTX_in_an_Eclipse_Plugin

Then I followed this link to wrappe the rxtx library in a bundle http://rxtx.qbang.org/wiki/index.php/Wrapping_RXTX_in_an_Eclipse_Plugin

我在捆绑清单中添加了以下内容:

I added to the bundle manifest this:

Bundle-NativeCode: /usr/lib/jni/librxtxSerial.so;osname="Linux";processor="armv6l"

因为我的操作系统类型是 linux,我的架构是 ARM:

cause my os type is linux, my architecture is ARM:

pi@raspberrypi ~ $ cat /proc/sys/kernel/{ostype,osrelease,version}
Linux
3.18.11+
#781 PREEMPT Tue Apr 21 18:02:18 BST 2015

pi@raspberrypi ~ $ arch
armv6l

但我仍然无法安装捆绑包,出现此错误:

But still I can't install the bundle, I got this error:

!ENTRY  1 0 2015-06-19 10:19:40.982
!MESSAGE [IAgent][RemoteBundleAdminImpl@17f36b1] [startBundle] Bundle cannot be started: Error[code=-6000;message=Failed to start bundle: The bundle "RXTX_Bundle_1.0.0 [77]" could not be resolved. Reason: No match found for native code: /usr/lib/jni/librxtxSerial.so; processor=armv6l; osname=Linux;details=null]
!STACK 0
org.osgi.framework.BundleException: The bundle "RXTX_Bundle_1.0.0 [77]" could not be resolved. Reason: No match found for native code: /usr/lib/jni/librxtxSerial.so; processor=armv6l; osname=Linux
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1332)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316)
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
        at org.tigris.mtoolkit.iagent.internal.rpc.RemoteBundleAdminImpl.startBundle(RemoteBundleAdminImpl.java:230)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.tigris.mtoolkit.iagent.internal.pmp.InvocationThread.run(InvocationThread.java:54)
        at org.tigris.mtoolkit.iagent.internal.utils.ThreadPool$Worker.run(ThreadPool.java:179)
        at java.lang.Thread.run(Thread.java:724)

我做错了什么?非常感谢您的帮助!

What have I did wrong? Thanks a lot for your help!

更新在遵循@Jorge Martinez 的建议之后:这是我更新的清单行:

Updates after following @Jorge Martinez suggestion: here is my updated line of the manifest:

Bundle-NativeCode: nativelib/librxtxSerial.so;osname="Linux";processor="armv6l"

这是我的 rxtx 包的内容列表:

here is the list of content of my rxtx bundle:

推荐答案

Jorge 的回答是正确的.您是否亲自检查过 Eclipse 创建的包以确认您的 nativelib 目录是否存在?从 Eclipse 导出包时,您必须确保指定构建中包含哪些文件夹和文件.这是通过打开 build.properties 文件并在您希望包含的文件夹/文件旁边放置一个复选标记来完成的.

Jorge's response is correct. Have you physically examined the bundle being created by Eclipse to confirm your nativelib directory is present? When exporting the bundle from Eclipse, you have to ensure you specify which folders and files are included in the build. This is done by opening the build.properties file and placing a check mark by the folder/files you wish to include.

这篇关于在我的 Raspberry 中安装 rxtx 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆