我在创建Tizen Emulator Wearable(2.3.1)的虚拟机时遇到问题。一切都安装正确,但一旦我想创建一个新的虚拟机它返回错误133.我正在运行Mac OS X(10.9.5)。
JAVA HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre
JAVA VENDOR: Oracle Corporation
JAVA VERSION: 1.8.0_40
OS ARCH: x86_64
OS NAME: Mac OS X
OS VERSION: 10.9.5
SWT PLATFROM: cocoa
SWT VERSION: 4527
[2016.8.17 9:1:45.269][INFO][About.printSystemInformation] EmulatorManager Information
Version: 2.4.0_Rev8
Build time: 20160608-1400 (GMT)
Git version: fatal: Not a git repository (or any of the parent directories): .git
Workspace path: /Users/xruiz/tizen-sdk-data/emulator/vms
Package version: 2.4.199
[2016.8.17 9:1:45.286][INFO][EmulatorManager.main] Start Emulator Manager!!
[2016.8.17 9:1:45.306][INFO][CheckGPU.work] Support GPU: true
[2016.8.17 9:1:45.306][INFO][CheckGPU.work] Gallium: false
[2016.8.17 9:1:45.306][INFO][Overseer$1.run] Overseer [Checkers] is done...
[2016.8.17 9:1:49.844][INFO][NameItem.checkVMName] If you do not need this VM(), delete VM folder.
[2016.8.17 9:1:50.486][INFO][TemplateLoader.loadTemplate] 2.3.1-wearable-circle-template-v2.xml is loaded for 2.3.1-wearable-circle
[2016.8.17 9:1:50.504][WARNING][StandardPlatform.makeItemList] Fail to load ItemListFactory. Image : 2.3.1-wearable-circle
[2016.8.17 9:1:50.504][INFO][StandardPlatform.makeItemList] Use CommonItemListFactory.
[2016.8.17 9:1:50.552][INFO][TemplateLoader.loadTemplate] 2.3.1-wearable-circle-template-v2.xml is loaded for 2.3.1-wearable
[2016.8.17 9:1:50.552][WARNING][StandardPlatform.makeItemList] Fail to load ItemListFactory. Image : 2.3.1-wearable
[2016.8.17 9:1:50.552][INFO][StandardPlatform.makeItemList] Use CommonItemListFactory.
[2016.8.17 9:1:55.643][WARNING][QemuImgProc$1.run] Failed check base image...(from qemu-img)
dyld: Library not loaded: @rpath/libz.1.2.8.dylib
[2016.8.17 9:1:55.644][WARNING][QemuImgProc$1.run] Failed check base image...(from qemu-img)
Referenced from: /Users/xruiz/tizen-sdk/tools/emulator/bin/qemu-img
[2016.8.17 9:1:55.644][WARNING][QemuImgProc$1.run] Failed check base image...(from qemu-img)
Reason: image not found
[2016.8.17 9:1:56.29][WARNING][QemuImgProc.RunningForCheckImg] Error while running 'qemu-img'. Exit value : 133
[2016.8.17 9:1:56.32][WARNING][Creator.createInternal] Failed to create the VM: Error while running 'qemu-img'. Exit value : 133
You can get more information in log file (/Users/xruiz/tizen-sdk-data/emulator/vms/emulator-manager)
[2016.8.17 9:1:56.35][WARNING][CreateVMTableViewer.createEmulator] Failed to create Emulator (w-0817-1)
Error while running 'qemu-img'. Exit value : 133
知道怎么办?
答案 0 :(得分:2)
发生错误是因为模拟器可执行文件(qemu-img)使用run-path(rpath)来查找动态库:
otool -L qemu-img
qemu-img:
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.17.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
@rpath/libz.1.2.8.dylib (compatibility version 1.0.0, current version 1.2.8)
@rpath/libgthread-2.0.0.dylib (compatibility version 4801.0.0, current version 4801.1.0)
@rpath/libglib-2.0.0.dylib (compatibility version 4801.0.0, current version 4801.1.0)
@rpath/libintl.8.dylib (compatibility version 10.0.0, current version 10.4.0)
/usr/lib/libutil.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
其中@rpath定义为:
Load command 23
cmd LC_RPATH
cmdsize 32
path @executable_path (offset 12)
@executable_path在Mac上具有特殊含义,与qemu-img所在的路径不同。
要解决此问题,请执行以下操作:
cd <root>/tizen-sdk/tools/emulator/bin
install_name_tool -add_rpath "<root>/tizen-sdk/tools/emulator/bin/" qemu-img
其中&lt; root&gt;是安装tizen-sdk的目录。
验证您的@rpath列表是否已被修改:
otool -l qemu-img
你应该在底部看到:
Load command 24
cmd LC_RPATH
cmdsize 56
path <root>/tizen-sdk/tools/emulator/bin/
现在重启你的模拟器管理器,它应该可以工作。
修复它的另一种方法是将库(* .dylib)从&lt; root&gt; / tizen-sdk / tools / emulator / bin /复制到/ usr / local / lib,但要注意这种方法,不要如果库已经存在,则覆盖该库。在我的情况下,我需要复制:
libglib-2.0.0.dylib
libgthread-2.0.0.dylib
libiconv.2.dylib
libintl.8.dylib
libpcre.1.dylib
libz.1.2.8.dylib
第二种方法存在风险,因为它会影响其他应用程序,我不会推荐它。
TIZEN STUDIO的最新消息 我刚刚下载了新的Tizen Studio 1.0,发现它的模拟器有同样的问题。幸运的是,同样的修复程序也适用于此,但您需要修补两个可执行文件:
<root>/tizen-studio/tools/emulator/bin/qemu-img
<root>/tizen-studio/platforms/tizen-2.3.2/common/emulator/bin/emulator-x86_64
对于第一个使用与旧tizen sdk相同的命令(见上文),对于第二个使用此命令:
cd <root>/tizen-studio/platforms/tizen-2.3.2/common/emulator/bin
install_name_tool -add_rpath "<root>/tizen-studio/platforms/tizen-2.3.2/common/emulator/bin" emulator-x86_64
答案 1 :(得分:0)
偶然发现了Tizen Studio 1.0.2的类似错误。错误仍然存在,并建议使用install_name_tool解决方案为我工作。
小小的提示可以节省一些打字:
cd <root>/tizen-studio/platforms/tizen-2.3.2/common/emulator/bin
install_name_tool -add_rpath $(pwd) emulator-x86_64