[Solved] Can't run sikuli IDE

我的系統環境是 ubuntu 16.10 64bit,這兩天裝 sikuli 時出現以往沒遇過的問題,記錄下來以免下次又遇到。
安裝方式大致說一下

1. 安裝 jdk
2. 安裝 sikuli: java -jar sikulixsetup-1.1.0.jar
3. 執行 runsikulix 時出現下列錯誤 (libopencv_core.so not found 或是 libtesseract.so not found)

[info] runcmd: lsb_release -i -r -s
[info] HotkeyManager: add Capture Hotkey: CTRL+SHIFT 2 (50, 3)
[info] HotkeyManager: add Abort Hotkey: ALT+SHIFT C (67, 9)
[error] RunTimeIDE: loadLib: libVisionProxy.so not usable:
java.lang.UnsatisfiedLinkError: /home/nick/.Sikulix/SikulixLibs_201510051707/libVisionProxy.so: libopencv_core.so.2.4: 無法開啟共用目的檔: 沒有此一檔案或目錄
[error] RunTimeIDE: loadLib: libVisionProxy.so not usable:
java.lang.UnsatisfiedLinkError: /home/nick/.Sikulix/SikulixLibs_201510051707/libVisionProxy.so: libopencv_core.so.2.4: 無法開啟共用目的檔: 沒有此一檔案或目錄
[info] runcmd: ldconfig -p
[info] runcmd: wmctrl -m
[error] RunTimeIDE: fatal error: java.io.IOException: Cannot run program "wmctrl": error=2, 沒有此一檔案或目錄
[error] LinuxSupport: checking: wmctrl not available or not working
[info] runcmd: xdotool version
[error] RunTimeIDE: fatal error: java.io.IOException: Cannot run program "xdotool": error=2, 沒有此一檔案或目錄
[error] LinuxSupport: checking: xdotool not available or not working
[info] runcmd: /home/nick/.Sikulix/sikulixlibs/linux/runBuild
[info] runcmd: ldd -r /home/nick/.Sikulix/sikulixlibs/linux/Build/Target/libVisionProxy.so
[error] LinuxSupport: checking: might not work, has undefined symbols: libVisionProxy.so
[error] LinuxSupport: ------- output of the build run
0
----------- COMPILING
----- cvgui.cpp
----- finder.cpp
----- pyramid-template-matcher.cpp
----- sikuli-debug.cpp
----- tessocr.cpp
----- vision.cpp
----- visionJAVA_wrap.cxx
----------- LINKING

[error] RunTimeIDE: Problematic lib: /home/nick/.Sikulix/SikulixLibs_201510051707/libVisionProxy.so (...TEMP...)
[error] RunTimeIDE: libVisionProxy.so loaded, but it might be a problem with needed dependent libraries
ERROR: ...TEMP...: libopencv_core.so.2.4: 無法開啟共用目的檔: 沒有此一檔案或目錄
[error] RunTimeIDE:  *** terminating: problem with native library: libVisionProxy.so

4. 安裝 opencv, tesseract (圖形處理函式庫跟OCR圖形文字辨識函式庫)

sudo apt-get install libopencv-dev
sudo apt-get install tesseract-ocr

5. 執行 runsikulix 時出現下列錯誤 (錯誤像擠牙膏一樣,擠了才出來)

running SikuliX: -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine
-jar ./sikulix.jar
[info] runcmd: lsb_release -i -r -s
[info] HotkeyManager: add Capture Hotkey: CTRL+SHIFT 2 (50, 3)
[info] HotkeyManager: add Abort Hotkey: ALT+SHIFT C (67, 9)
[error] RunTimeIDE:  *** terminating: command 'wmctrl' is not executable
command 'xdotool' is not executable
please check the Availability!

6. 安裝 wmctrl, xdotool

sudo apt-get install wmctrl
sudo apt-get install xdotool

7. done

參考: Special setup information for Linux systems

留言

這個網誌中的熱門文章

相見恨晚的自動化測試開發工具 Sikuli

[IIS] 自我簽署憑證來啟用SSL

台北市安心地圖