尝试运行 Matlab-Compiler-Runtime 应用程序时,Windows 7 中出现 SxS 错误

Posted

技术标签:

【中文标题】尝试运行 Matlab-Compiler-Runtime 应用程序时,Windows 7 中出现 SxS 错误【英文标题】:SxS error in Windows 7 when trying to run a Matlab-Compiler-Runtime application 【发布时间】:2011-06-09 14:39:27 【问题描述】:

我正在尝试在 Windows 7 机器上运行作为独立 Matlab 应用程序构建的数据分析工具。我已经安装了 Matlab 编译器运行时 (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.

我第一次尝试重新启动。然后是 MCR 环境的修复安装。然后删除并全新安装。错误没有变化。所以我决定勇敢地面对我对 Windows 的缺乏经验(我非常喜欢 Linux 或 Mac),并打破了 sxstrace 工具。我按照此处列出的程序"Diagnosing side by side failures" 进行操作,并从该工具得到以下输出(对于发布完整跟踪,我表示诚挚的歉意,但我不确定什么是相关的):

=================
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\8.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\8.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\8.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\8.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\8.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\8.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\8.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.

再次对发布完整日志表示诚挚的歉意,但对我来说这是希腊语。我不确定如何继续,希望得到一些指示。

【问题讨论】:

帮助我调试了我的问题,即使记事本拒绝正确解码“Unicode”。至少有“VC8.0”。当 MS 应用程序甚至无法理解它们自己的编码时,我们就不要谈论互操作了,是的...... 【参考方案1】:

这看起来像是在 64 位 Windows 机器上运行 32 位编译的 Matlab 应用程序,但它没有找到它所链接的 32 位 Visual C++ 运行时。 (在 64 位 Windows 上,32 位应用程序在 32 位子系统中运行,并链接到其库的 32 位版本。)IIRC,早期版本的 MCR 安装程序可能不会安装其所有 Visual C++ 运行时依赖项。您可能需要自己安装。

我认为“VC80”对应于 Visual Studio 2005。检查您的“添加和删除程序”控制面板,查看安装了哪些“Microsoft Visual C++ XXXX Redistributable”。 (在我用于 Matlab 开发的 x64 XP 机器上,我有近十几种变体。)你需要一个 32 位 (x86) 2005 的机器,它被命名为“Microsoft Visual C++ 2005 Redistributable”。 not 在其名称的末尾有“(x64)”;那是64位的。它们可以同时安装在 64 位系统上。

如果您没有安装它,请从此处下载并安装它,然后再次尝试运行该应用程序。如果这不起作用,请尝试安装 2008 版本。

http://www.microsoft.com/download/en/details.aspx?id=5638

【讨论】:

以上是关于尝试运行 Matlab-Compiler-Runtime 应用程序时,Windows 7 中出现 SxS 错误的主要内容,如果未能解决你的问题,请参考以下文章

尝试运行命令“flutter run”时出错

尝试运行 jupyter notebook 时出现导入错误

尝试让 Javascript 函数同步运行

尝试运行android时出现Meteor.js错误

尝试为 iOS 运行或构建 Flutter 项目时出错

第一次尝试运行 KIVY