"LC.exe" exited with code -1 错误

当使用VS程序打开时遇到LC.exeexitedwithcode-1错误时,只需删除licenses.licx文件即可解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

当打开一个VS程序时出现"LC.exe" exited with code -1错误,解决方法是:

删除licenses.licx文件即可

转载于:https://www.cnblogs.com/mengzhixingping/p/3492493.html

Microsoft Windows [版本 10.0.22631.4890] (c) Microsoft Corporation。保留所有权利。 C:\Users\LGM>pip install glpk Looking in indexes: https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple Collecting glpk Using cached https://mirrors.tuna.tsinghua.edu.cn/pypi/web/packages/62/7f/a23262ffe0c8363c242bdc140d5895d96144741edaffc8bcc82e6bc72085/glpk-0.4.8.tar.gz (160 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: glpk Building wheel for glpk (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for glpk (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [11 lines of output] running bdist_wheel running build running build_ext building 'glpk' extension creating build\temp.win-amd64-cpython-313\Release\src "D:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DVERSION_NUMBER=\"\\\"0.4.8\\\"\" "-ID:\develop\Python\Python 3.13.2\include" "-ID:\develop\Python\Python 3.13.2\Include" "-ID:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\include" "-ID:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /Tcsrc\2to3.c /Fobuild\temp.win-amd64-cpython-313\Release\src\2to3.obj 2to3.c "D:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DVERSION_NUMBER=\"\\\"0.4.8\\\"\" "-ID:\develop\Python\Python 3.13.2\include" "-ID:\develop\Python\Python 3.13.2\Include" "-ID:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.43.34808\include" "-ID:\develop\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" /Tcsrc\bar.c /Fobuild\temp.win-amd64-cpython-313\Release\src\bar.obj bar.c C:\Users\LGM\AppData\Local\Temp\pip-install-lyopgudc\glpk_61bd5779471d4bf7a2ee00d38b4876cf\src\lp.h(24): fatal error C1083: 无法打开包括文件: “glpk.h”: No such file or directory error: command 'D:\\develop\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.43.34808\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for glpk Failed to build glpk ERROR: Failed to build installable wheels for some pyproject.toml based projects (glpk) C:\Users\LGM>
03-12
PS D:\YOLOV5> pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting gitpython>=3.1.30 (from -r requirements.txt (line 5)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/1d/9a/4114a9057db2f1462d5c8f8390ab7383925fe1ac012eaa42402ad65c2963/GitPython-3.1.44-py3-none-any.whl (207 kB) Collecting matplotlib>=3.3 (from -r requirements.txt (line 6)) Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2f/08/b89867ecea2e305f408fbb417139a8dd941ecf7b23a2e02157c36da546f0/matplotlib-3.10.1.tar.gz (36.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 36.7/36.7 MB 2.4 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [3 lines of output] + meson setup C:\Users\30507\AppData\Local\Temp\pip-install-c4qubktk\matplotlib_c6d574ff2da74d47abcf3071e408894d C:\Users\30507\AppData\Local\Temp\pip-install-c4qubktk\matplotlib_c6d574ff2da74d47 abcf3071e408894d\.mesonpy-wbwy2yc1 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\30507\AppData\Local\Temp\pip-install-c4qubktk\matplotlib_c6d574ff2da74d47abcf3071e408894d\.mesonpy-wbwy2yc1\meson-python-native-file.ini ERROR: Malformed machine file 'C:\\Users\\30507\\AppData\\Local\\Temp\\pip-install-c4qubktk\\matplotlib_c6d574ff2da74d47abcf3071e408894d\\.mesonpy-wbwy2yc1\\meson-python-native-file.ini' failed to parse as unicode: 'utf-8' codec can't decode byte 0xc0 in position 29: invalid start byte [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, n
03-23
Windows PowerShell 版权所有(C) Microsoft Corporation。保留所有权利。 安装最新的 PowerShell,了解新功能和改进!https://aka.ms/PSWindows (.venv1) PS D:\OCR\AW> pip install cmake -i https://pypi.tuna.tsinghua.edu.cn/simple Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting cmake Downloading https://pypi.tuna.tsinghua.edu.cn/packages/16/1a/6504170f8cfadde043ed5dabadcca8af50545094428ed74c44c1eac3903f/cmake-4.0.2-py3-none-win_amd64.whl (36.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 36.7/36.7 MB 21.8 MB/s eta 0:00:00 Installing collected packages: cmake Successfully installed cmake-4.0.2 [notice] A new release of pip is available: 23.2.1 -> 25.1.1 [notice] To update, run: python.exe -m pip install --upgrade pip (.venv1) PS D:\OCR\AW> pip install dlib==19.24.0 -i https://pypi.tuna.tsinghua.edu.cn/simple Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting dlib==19.24.0 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e5/3b/7a8522a5c2ef6ff6252e46b0788b3d2c2280198c49d6ecf3b576b171045f/dlib-19.24.0.tar.gz (3.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 3.5 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [60 lines of output] running bdist_wheel running build running build_py running build_ext C:\Users\Admin\AppData\Local\Temp\pip-install-8ye8wh45\dlib_06503242b7ff453f95f8a7e1db2cf260\setup.py:129: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(cmake_version) < &#39;3.1.0&#39;: Building extension for Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] Invoking CMake setup: &#39;cmake C:\Users\Admin\AppData\Local\Temp\pip-install-8ye8wh45\dlib_06503242b7ff453f95f8a7e1db2cf260\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Admin\AppData\Local\Temp\pip-install-8ye8wh45\d lib_06503242b7ff453f95f8a7e1db2cf260\build\lib.win-amd64-cpython-39 -DPYTHON_EXECUTABLE=D:\OCR\AW\.venv1\Scripts\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Admin\AppData\Local\Temp\pip-install-8ye8wh45\dlib_06503242b7ff453f95f8a7e1db2cf260\build\lib.win-amd64-cpython-39 -A x64&#39; -- Building for: Visual Studio 17 2022 CMake Error at CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 3.5 has been removed from CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. -- Configuring incomplete, errors occurred! Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "C:\Users\Admin\AppData\Local\Temp\pip-install-8ye8wh45\dlib_06503242b7ff453f95f8a7e1db2cf260\setup.py", line 222, in <module> setup( File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\__init__.py", line 103, in setup return distutils.core.setup(**attrs) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup return run_commands(dist) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands dist.run_commands() File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands self.run_command(cmd) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\dist.py", line 1001, in run_command super().run_command(command) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command cmd_obj.run() File "D:\OCR\AW\.venv1\lib\site-packages\wheel\bdist_wheel.py", line 364, in run self.run_command("build") File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command self.distribution.run_command(command) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\dist.py", line 1001, in run_command super().run_command(command) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command cmd_obj.run() File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run self.run_command(cmd_name) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command self.distribution.run_command(command) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\dist.py", line 1001, in run_command super().run_command(command) File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command cmd_obj.run() File "C:\Users\Admin\AppData\Local\Temp\pip-install-8ye8wh45\dlib_06503242b7ff453f95f8a7e1db2cf260\setup.py", line 134, in run self.build_extension(ext) File "C:\Users\Admin\AppData\Local\Temp\pip-install-8ye8wh45\dlib_06503242b7ff453f95f8a7e1db2cf260\setup.py", line 171, in build_extension subprocess.check_call(cmake_setup, cwd=build_folder) File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command &#39;[&#39;cmake&#39;, &#39;C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-8ye8wh45\\dlib_06503242b7ff453f95f8a7e1db2cf260\\tools\\python&#39;, &#39;-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Admin\\AppD ata\\Local\\Temp\\pip-install-8ye8wh45\\dlib_06503242b7ff453f95f8a7e1db2cf260\\build\\lib.win-amd64-cpython-39&#39;, &#39;-DPYTHON_EXECUTABLE=D:\\OCR\\AW\\.venv1\\Scripts\\python.exe&#39;, &#39;-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-8ye8wh45\\dlib_06503242b7ff453f95f8a7e1db2cf260\\build\\lib.win-amd64-cpython-39&#39;, &#39;-A&#39;, &#39;x64&#39;]&#39; returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects [notice] A new release of pip is available: 23.2.1 -> 25.1.1 [notice] To update, run: python.exe -m pip install --upgrade pip (.venv1) PS D:\OCR\AW> 不可以啊你看
06-13
<think>我们正在处理一个Unity构建错误:"Internal build system error. BuildProgram exited with code -2147450740"。这个错误代码通常与系统环境或构建工具的问题相关。根据以往经验,我们可以从以下几个方面进行排查和修复: ### 1. **检查Unity版本兼容性** - 确保使用的Unity版本与目标平台(如Android、iOS、Windows等)兼容。如果版本过旧,建议升级到最新稳定版。 - 如果最近升级了Unity,可能是新版本引入了问题,可以尝试回退到之前的稳定版本。 ### 2. **清理构建缓存** - Unity构建过程中可能会因为缓存损坏导致错误。尝试清理缓存: - 在Unity编辑器中,选择 `Edit > Preferences > Gi Cache`,点击 `Reset`。 - 手动删除项目目录下的 `Library` 文件夹(注意:删除后首次打开项目会重新导入资源,耗时较长)。 ### 3. **检查构建工具** - 对于Android构建,确保已安装正确的Android SDK/NDK版本(Unity Hub中可管理)。 - 对于iOS构建,确保Xcode已正确安装并配置命令行工具。 - 重新安装构建模块:在Unity Hub中,选中项目对应的Unity版本,在`Installed modules`中重新安装相关平台模块(如Android Build Support)。 ### 4. **检查项目设置** - **脚本编译错误**:确保项目中没有任何脚本错误(检查Console窗口)。 - **PlayerSettings设置**:检查`Project Settings > Player`中的设置,特别是`Other Settings`下的`Scripting Runtime Version`和`Api Compatibility Level`。尝试切换为`.NET 4.x`(如果当前是`.NET Standard 2.0`)或反之。 - **图形API设置**:在`PlayerSettings > Other Settings`中,确保`Auto Graphics API`未勾选,并尝试只保留一个图形API(如OpenGLES3或Vulkan)。 ### 5. **系统环境问题** - **权限问题**:确保Unity有足够的权限访问项目目录(特别是Windows系统,避免将项目放在系统保护目录如`Program Files`下)。 - **防病毒软件**:临时禁用防病毒软件(有时会误杀构建进程)。 - **磁盘空间**:确保磁盘有足够空间。 ### 6. **其他通用修复** - 重启Unity和计算机。 - 重新导入整个项目:在Unity中选择`Assets > Reimport All`。 - 新建一个空白项目,尝试构建,以判断是项目问题还是Unity安装问题。 ### 参考解决方案 根据社区反馈,以下方法曾解决类似错误- 更新或回退构建工具版本(如Android Gradle插件)[^1]。 - 修改Unity的构建脚本执行超时时间(通过命令行参数`-quit -batchmode -executeMethod`执行构建时,添加`-buildTarget`参数)[^2]。 ### 示例:命令行构建(用于测试) 如果编辑器界面构建失败,可尝试命令行构建以获取更详细日志: ```bash Unity.exe -quit -batchmode -projectPath "你的项目路径" -executeMethod BuildScript.Build -logFile build.log ``` 检查生成的`build.log`文件,搜索错误信息。 §§相关问题§§ 1. Unity构建过程中出现其他常见错误代码(如-1073741819)应如何解决? 2. 如何优化Unity项目的构建时间和大小? 3. Unity构建Android应用时遇到Gradle失败该怎么办?</think>### Unity构建错误 "Internal build system error. BuildProgram exited with code -2147450740" 解决方案 此错误通常由以下原因引起,请逐步排查: #### 1. **构建工具损坏** - **解决方案**: 1. 关闭Unity编辑器 2. 删除项目目录中的以下文件夹: - `Library` - `Temp` - `obj` (Unity 2020+) 3. 重新打开项目并尝试构建 - 原理:构建缓存损坏会导致模块加载失败[^1] #### 2. **Android模块冲突(常见于Mac系统)** - **解决方案**: 1. 通过Unity Hub卸载当前Android支持模块 2. 重新安装**特定版本**的Android模块: ```bash # 在终端执行(需替换路径) /Applications/Unity/Hub/Editor/[版本号]/Unity.app/Contents/MacOS/Unity \ -uninstallAndroidBuildSupport \ -installAndroidBuildSupport ``` 3. 确认使用JDK 8而非更高版本(Unity 2020.3+推荐) - 原理:Mac系统下Android模块加载异常是已知问题[^1] #### 3. .NET框架兼容性问题 - **解决方案**: 1. 打开 `Project Settings > Player` 2. 在 `Other Settings` 中: - 将 `Scripting Runtime Version` 改为 **.NET 4.x** - 将 `Api Compatibility Level` 改为 **.NET Standard 2.0** 3. 重启Unity #### 4. 防病毒软件干扰 - **解决方案**: 1. 将Unity安装目录和项目目录添加到防病毒软件白名单 2. 临时禁用实时防护功能后尝试构建 - 原理:安全软件可能阻止BuildProgram.exe访问系统资源 #### 5. 图形API冲突 - **解决方案**: 1. 打开 `Project Settings > Graphics` 2. 在 `Always Included Shaders` 中移除未使用的着色器 3. 在 `Player Settings > Other Settings` 中: - 取消勾选 `Auto Graphics API` - 手动添加 `OpenGLES3` 并删除其他API #### 6. 终极解决方案(如上述均无效) ```bash # 彻底重装Unity(保留项目) rm -rf /Applications/Unity/Hub/Editor/[问题版本] unity-hub -- --install-editor [稳定版本] --changeset [对应变更集] ``` > **验证修复**:新建空白项目测试构建,确认是否环境问题。若空白项目正常,则原项目存在资源损坏。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值