我想在我的樹莓派 捆綁將在KURA平臺上運行安裝RXTX包(春分是庫拉OSGi容器)在我的覆盆子安裝RXTX包
我安裝使用RXTX本地庫: 命令和apt-get安裝librxtx的Java
的。所以安裝上的目錄:/ usr/lib目錄/ JNI/
[email protected] /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
然後我跟着這個鏈接wrappe的RXTX庫捆綁 http://rxtx.qbang.org/wiki/index.php/Wrapping_RXTX_in_an_Eclipse_Plugin
我加入到捆綁體現這一點:
Bundle-NativeCode: /usr/lib/jni/librxtxSerial.so;osname="Linux";processor="armv6l"
原因我的操作系統類型是Linux,我的架構是ARM:
[email protected] ~ $ cat /proc/sys/kernel/{ostype,osrelease,version}
Linux
3.18.11+
#781 PREEMPT Tue Apr 21 18:02:18 BST 2015
[email protected] ~ $ arch
armv6l
但我仍無法安裝包,我得到這個錯誤:
!ENTRY 1 0 2015-06-19 10:19:40.982
!MESSAGE [IAgent][[email protected]] [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)
我做錯了什麼? 非常感謝您的幫助!
更新 以下@Jorge馬丁內斯建議後: 這裏是我的更新清單的行:
Bundle-NativeCode: nativelib/librxtxSerial.so;osname="Linux";processor="armv6l"
這裏是我的RXTX包的內容列表:
此頁面有推薦的處理器值列表:http://www.osgi.org/Specifications/Reference - 它沒有列出armv61。可能值得嘗試使用ARM_be或ARM_le? 此外,可能值得添加你試圖實現@Jorge Martinez建議的詳細信息 - 確切的位置在jar和更新的Bundle-NativeCode行中。 – GregHNZ
我嘗試了ARM_be和ARM_le,但沒有任何工作,我用新配置更新了我的問題。 – sabrina2020