2014-03-26 90 views
1

想安裝在Ubuntu sikuli 12.4 隨後在下面的網站中提到的步驟安裝在UbuntuSikuli自動化

http://www.verious.com/tool/installing-sikuli-automation-tool-on-ubuntu-11-10/

Java是

~$ java -version 
java version "1.7.0_51" 
Java(TM) SE Runtime Environment (build 1.7.0_51-b13) 
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode) 

sikuli-IDE是成功加載,雖然我試圖捕獲屏幕上的圖像正在跟隨errror

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: /home/ushusadmin/sikuli/Sikuli-IDE/libs/libVisionProxy.so: libml.so.2.1: cannot open shared object file: No such file or directory 
at java.lang.ClassLoader$NativeLibrary.load(Native Method) 
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965) 
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890) 
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851) 
at java.lang.Runtime.load0(Runtime.java:795) 
at java.lang.System.load(System.java:1062) 
at com.wapmx.nativeutils.jniloader.NativeLoader.loadLibrary(NativeLoader.java:44) 
at org.sikuli.script.TextRecognizer.(TextRecognizer.java:24) 
at org.sikuli.ide.NamingPane.getFilenameFromImage(NamingPane.java:55) 
at org.sikuli.ide.CaptureButton.update(CaptureButton.java:149) 
at org.sikuli.script.CapturePrompt.notifyObserver(CapturePrompt.java:44) 
at org.sikuli.script.CapturePrompt$1.mouseReleased(CapturePrompt.java:197) 
at java.awt.Component.processMouseEvent(Componen 

t.java:6505) 
at java.awt.Component.processEvent(Component.java:6270) 
at java.awt.Container.processEvent(Container.java:2229) 
at java.awt.Window.processEvent(Window.java:2022) 
at java.awt.Component.dispatchEventImpl(Component.java:4861) 
at java.awt.Container.dispatchEventImpl(Container.java:2287) 
at java.awt.Window.dispatchEventImpl(Window.java:2719) 
at java.awt.Component.dispatchEvent(Component.java:4687) 
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735) 
at java.awt.EventQueue.access$200(EventQueue.java:103) 
at java.awt.EventQueue$3.run(EventQueue.java:694) 
at java.awt.EventQueue$3.run(EventQueue.java:692) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) 
at java.awt.EventQueue$4.run(EventQueue.java:708) 
at java.awt.EventQueue$4.run(EventQueue.java:706) 
at java.security.AccessController.doPrivileged(

Native Method) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) 
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705) 
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) 
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) 

我怎樣才能擺脫這種error.Am花我的天爲糾正這種錯誤,真的夠了:-(專家pelase幫我

回答

5

我在你的堆棧跟蹤注意到了這一點:

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: /home/ushusadmin/sikuli/Sikuli-IDE/libs/libVisionProxy.so: libml.so.2.1: cannot open shared object file: No such file or directory

關於libml.so.2.1未被發現的投訴使我懷疑你有一個老版本的Sikuli。因此,我建議使用最新版本Sikuli(1.0.1),並確保至少安裝了OpenCV 2.4.0。

請注意,Sikuli 1.0.1取決於OpenCV 2.4.0,而您鏈接的指南來自2.3.0可接受的日子。

我會嘗試刪除2.3版本libcv-dev軟件包的(如果這就是你所擁有的),而是從opencv2.4 PPA回購安裝libcv-dev的:

sudo add-apt-repository ppa:gijzelaar/opencv2.4 

而且,我注意到Sikuli人已經發布了libVisionProxy.so的特殊版本供下載;不知道它是否有意幫助像你這樣的系統,但如果使用Sikuli 1.0.1和OpenCV 2.4.0不起作用,可能值得一試。

問題中的文件是在Sikuli-1.0.1-Supplemental-LinuxVisionProxy.ziphttps://launchpad.net/sikuli/+download

最後,如果有幫助,這裏是我用來獲取Sikuli 1.0.1起來,在Ubuntu 12.04運行完整步驟:

  1. 安裝Oracle JRE(我使用的是1.7.0_51,就像你的ENV)

  2. 安裝OpenCV 2.4.0

    sudo add-apt-repository ppa:gijzelaar/opencv2.4 
    
    sudo apt-get update 
    
    sudo apt-get libcv-dev 
    

    或者,你也許可以通過建立/從源代碼安裝OpenCV的2.4.0,每個步驟以實現相同的:

    http://karytech.blogspot.com/2012/05/opencv-24-on-ubuntu-1204.html

    注意時,我試過了,我省略安裝步驟QT包,並在構建OpenCV時從我的cmake命令中刪除了「-D WITH_QT = ON」。

  3. 安裝的Tesseract 3:

    sudo apt-get install libtesseract3

  4. 下載sikuli-setup.jar並保存到〜/ SikuliX

  5. 啓動sikuli-setup.jar安裝Sikuli到〜/ SikuliX

    cd ~/SikuliX && java -jar sikuli-setup.jar

    我所選擇的 「包1」 ○並讓設置正常進行。

  6. 在IDE中創建一個Sikuli腳本並運行它。

    此外,我發現使用「runIDE -r」選項運行.sikuli項目對解決依賴性問題非常有幫助;這似乎導致與在IDE中運行腳本相比,有關錯誤的更多信息。例如:

    ~/SikuliX/runIDE -r foo.sikuli

這裏是我的操作系統和JRE環境細節:

$ lsb_release -a 
No LSB modules are available. 
Distributor ID: Ubuntu 
Description: Ubuntu 12.04.3 LTS 
Release: 12.04 
Codename: precise 

$ java -version 
java version "1.7.0_51" 
Java(TM) SE Runtime Environment (build 1.7.0_51-b13) 
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode) 
+0

它真的很有幫助。 – Anvay