尝试运行 Matlab-Compiler-Runtime 应用程序时,Windows 7 中出现 SxS 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6294608/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
SxS error in Windows 7 when trying to run a Matlab-Compiler-Runtime application
提问by Sevenless
I'm trying to run a data analysis tool that was built as a standalone Matlab application on a Windows 7 machine. I've installed the Matlab Compiler Runtime (MCR) libraries version 7.11, 2009b. When I attempt to launch the application ELISAgui.exe I get the following error:
我正在尝试在 Windows 7 机器上运行作为独立 Matlab 应用程序构建的数据分析工具。我已经安装了 Matlab Compiler Runtime (MCR) 库 7.11, 2009b。当我尝试启动应用程序 ELISAgui.exe 时,出现以下错误:
C:\Users\amatteson\temp\ELISAgui>ELISAgui.exe
My Own Exception: Fatal error loading library C:\Program Files (x86)\MATLAB\MATL
AB Compiler Runtime\v711\bin\win32\mclmcr.dll Error: The application has failed
to start because its side-by-side configuration is incorrect. Please see the app
lication event log or use the command-line sxstrace.exe tool for more detail.
I first attempted a reboot. Then a repair install of the MCR environment. Then a delete and totally new install. No change in the error. So I decided to brave my inexperience with Windows (I'm very much a Linux or Mac guy) and break out the sxstrace tool. I followed the procedure outlined here "Diagnosing side by side failures"and arrived with the following output from the tool (my sincere apologies for posting the full trace, but I'm not sure what's relevant):
我首先尝试重新启动。然后修复安装 MCR 环境。然后删除并全新安装。错误没有变化。所以我决定勇敢面对我对 Windows 的缺乏经验(我非常喜欢 Linux 或 Mac)并开发 sxstrace 工具。我遵循了此处概述的程序“诊断并排故障”,并从该工具中获得了以下输出(我对发布完整跟踪表示诚挚的歉意,但我不确定什么是相关的):
=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = Wow32
CultureFallBacks = en-US;en
ManifestPath = C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v711\bin\win32\hg.dll
AssemblyDirectory = C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v711\bin\win32\
Application Config File =
-----------------
INFO: Parsing Manifest File C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v711\bin\win32\hg.dll.
INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762"
INFO: Reference: Microsoft.VC80.MFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762"
INFO: Resolving reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762".
INFO: Resolving reference for ProcessorArchitecture WOW64.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.CRT.0.50727.762__1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.DLL.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
INFO: Resolving reference for ProcessorArchitecture x86.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: Find publisher policy at C:\Windows\WinSxS\manifests\x86_policy.8.0.microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_none_516ad11f0f4bdafe.manifest
INFO: Publisher Policy redirected assembly version.
INFO: Post policy assembly identity is Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4927".
INFO: Begin assembly probing.
INFO: Attempt to probe manifest at C:\Windows\WinSxS\manifests\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_none_d08a205e442db5b5.manifest.
INFO: Manifest found at C:\Windows\WinSxS\manifests\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4927_none_d08a205e442db5b5.manifest.
INFO: End assembly probing.
INFO: Resolving reference Microsoft.VC80.CRT.mui,language="*",processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.4927".
INFO: Resolving reference for ProcessorArchitecture WOW64.
INFO: Resolving reference for culture en-US.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.CRT.mui.0.50727.4927_en-US_1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.mui.DLL.
INFO: Did not find manifest for culture en-US.
INFO: End assembly probing.
INFO: Resolving reference for culture en.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.CRT.mui.0.50727.4927_en_1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.mui.DLL.
INFO: Did not find manifest for culture en.
INFO: End assembly probing.
INFO: Resolving reference for ProcessorArchitecture x86.
INFO: Resolving reference for culture en-US.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.CRT.mui.0.50727.4927_en-US_1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.mui.DLL.
INFO: Did not find manifest for culture en-US.
INFO: End assembly probing.
INFO: Resolving reference for culture en.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.CRT.mui.0.50727.4927_en_1fc8b3b9a1e18e3b\Microsoft.VC80.CRT.mui.DLL.
INFO: Did not find manifest for culture en.
INFO: End assembly probing.
INFO: Resolving reference Microsoft.VC80.MFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762".
INFO: Resolving reference for ProcessorArchitecture WOW64.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.MFC.0.50727.762__1fc8b3b9a1e18e3b\Microsoft.VC80.MFC.DLL.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
INFO: Resolving reference for ProcessorArchitecture x86.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC80.MFC.0.50727.762__1fc8b3b9a1e18e3b\Microsoft.VC80.MFC.DLL.
INFO: Attempt to probe manifest at C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v711\bin\win32\Microsoft.VC80.MFC.DLL.
INFO: Attempt to probe manifest at C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v711\bin\win32\Microsoft.VC80.MFC.MANIFEST.
INFO: Attempt to probe manifest at C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v711\bin\win32\Microsoft.VC80.MFC\Microsoft.VC80.MFC.DLL.
INFO: Attempt to probe manifest at C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v711\bin\win32\Microsoft.VC80.MFC\Microsoft.VC80.MFC.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC80.MFC,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762".
ERROR: Activation Context generation failed.
End Activation Context Generation.
Again, my sincere apologies for posting the full log, but it's Greek to me. I'm not sure how to proceed and would appreciate some pointers.
再次,我对发布完整日志表示诚挚的歉意,但这对我来说是希腊文。我不确定如何进行,希望得到一些指导。
回答by Andrew Janke
This looks like you're runnning a 32-bit compiled Matlab app on a 64-bit Windows machine, and it's not finding the 32-bit Visual C++ runtime it's linked against. (On 64-bit Windows, 32-bit applications run in a 32-bit subsystem and are linked against 32-bit versions of their libraries.) IIRC, the MCR installer for earlier versions may not install all of its Visual C++ Runtime dependencies. You may need to install it yourself.
这看起来像是在 64 位 Windows 机器上运行 32 位编译的 Matlab 应用程序,但它没有找到它链接的 32 位 Visual C++ 运行时。(在 64 位 Windows 上,32 位应用程序在 32 位子系统中运行并与其库的 32 位版本链接。)IIRC,早期版本的 MCR 安装程序可能不会安装其所有 Visual C++ 运行时依赖项。您可能需要自己安装。
I think "VC80" corresponds to Visual Studio 2005. Check your Add and Remove Programs control panel to see which "Microsoft Visual C++ XXXX Redistributable" ones are installed. (On the x64 XP box I use for Matlab development, I have nearly a dozen variants.) You'll need the 32-bit (x86) 2005 one, which is named "Microsoft Visual C++ 2005 Redistributable". It does nothave " (x64)" at the end of it's name; that's the 64-bit one. They can both be installed simultaneously on a 64-bit system.
我认为“VC80”对应于 Visual Studio 2005。检查您的“添加和删除程序”控制面板以查看安装了哪些“Microsoft Visual C++ XXXX Redistributable”。(在我用于 Matlab 开发的 x64 XP 机器上,我有近 12 种变体。)您需要 32 位 (x86) 2005,它名为“Microsoft Visual C++ 2005 Redistributable”。它的名称末尾没有“ (x64)”;那是64位的。它们可以同时安装在 64 位系统上。
If you don't have it installed, download it from here, install it, and try running the app again. If that doesn't work, try installing the 2008 version too.
如果您尚未安装它,请从此处下载并安装它,然后再次尝试运行该应用程序。如果这不起作用,请尝试安装 2008 版本。