开源版本安装问题

6

我正在尝试使用网络安装程序安装Qt的开源版本。 它会下载所有内容并安装到大约50%左右,然后错误开始弹出。 我收到以下错误:

Error during installation process (qt.qt5.51Z5.win64_rnsvcZ0‘l5_64):
l Execution failed (Unexpected exit code: 2): "C:\Qt\/Tools/QtCreator\bin
\sdktool.exe addQt --id qt.qt5.5125.win64_msvc2015_64 --nameQt %{Qt::Version}
MSVC2015 64bit --type Qt4ProjectManager.Qt\Version.Desktop --qrnake C:\Qt/
5.12.5/msvc2015_64/bin/qrnake.exe"

Error during installation process (qt,qt5.5125.win64_msvc2015_64): 
Execution failed (Unexpected exit code: 2): "C:\QtVTools/QtCreator\bin 
\sdktool.exe addKit --id qt,qt5.5125.win64_msvc2015_64_kit --name Desktop Qt %(Qt:Version) MSVC2015 
64bit --Ctoolchain x86-windows-msvc2015-pe-64bit -­Cxxtoolchain x86-windows-msvc2015-pe-64bit --qt 
qt,qt5.5125.win64_msvc2015_64--debuggerengine4 --devicetype Desktop"

Error during installation process (qt,qt5.5125.win32_msvc2017): 
Execution failed (Unexpected exit code: 2): "C:\QtVTools/QtCreator\bin 
\sdktool.exe addQt --id qt.qt5.5125.win32_msvc2017 --name Qt %(Qt:Version} MSVC2017 32bit --type 
Qt4ProjectManager.QtVersion.Desktop --qmake C:\Qt/ 5.12. 5/msvc2017 /bin/ qmake.exe"

Error during installation process (qt,qt5.5125.win64_msvc2017_64): 
Execution failed (Unexpected exit code: 2): "C:\QtVTools/QtCreator\bin 
\sdktool.exe addQt --id qt.qt5.5125.win64_msvc2017_64 --name Qt %(Qt:Version} MSVC2017 64bit --type 
Qt4ProjectManager.QtVersion.Desktop --qmake Cc\Qt/ 5.12.5/msvc2017 _ 64/bin/ qmake.exe"

Error during installation process (qt,qt5.5125.win64_msvc2017_64): 
Execution failed (Unexpected exit code: 2): "C:\Qt\/Tools/QtCreator\bin 
\sdktool.exe addKit --id qt,qt5.5125.win64_msvc2017_64_kit --name Desktop Qt %(Qt:Version} MSVC2017 
64bit --Ctoolchain x86-windows-msvc2017-pe-64bit -­Cxxtoolchain x86-windows-msvc2017-pe-64bit --qt 
qt.qt5.5125.win64_msvc2017_64 --debuggerengine 4 --devicetype Desktop"

我尝试了取消安装并重新安装,也重新下载了exe文件,但似乎没有起到任何帮助作用。

3个回答

6
这些错误很烦人。安装程序正在尝试运行sdktool来设置Qt构建工具包(编译器详细信息等)在刚刚安装的QtCreator中,但它无法完成,而且消息也从未告诉您为什么。以前我遇到过这种情况,结果发现是权限问题--sdktool用户(来自Qt安装程序)没有权限修改QtCreator安装文件夹中的内容。(这让我感到奇怪,因为我一直以管理员身份运行所有东西)。所以我的解决方案是确保QtCreator安装文件夹对我的系统上所有用户都有可写权限。实际上,我只修改Qt安装的整个Tools文件夹的权限。这个方法对我有效,即使在安装程序运行时,第一个错误提示后,我也可以进去更改权限并让它重试。
另一种选择是忽略那些错误,在QtCreator中手动设置编译器工具包,但这很麻烦,当已经为您设置好所有内容时,它肯定有助于开始工作。
另一种选择是复制这些失败的sdktool命令,并在安装后手动运行它们。我已经“在紧急情况下”做过几次了,但这也有点麻烦。

谢谢您的帮助。我会尝试您的建议。我已将此标记为已回答。 - Dr. Jason Amerson
在安装过程中,我也遇到了类似的错误提示: 无法下载存档 https://cdn.qt.io/qtsdkrepository/windows_x86/desktop/tools_maintenance/qt.tools.maintenance/42.0-0-202111081302tqtc-installer-framework-Windows-Windows_10-MSVC2015-Windows-Windows_10-X86-QtInstaller.7z:系统找不到指定的路径。 - Abdur Rahman
也提供一下你使用的修改权限命令会很好。 - CroCo
@CroCo 我使用Windows GUI来设置权限。在这里,我认为如何在Windows中设置权限的“屏幕录像”超出了范围,因为如果有人需要它,那么在线上有无数的指南可供参考。正如我所提到的,我会给计算机上的所有用户写入权限,以便访问Qt安装_Tools_文件夹及其子文件夹。其他人可能需要更细粒度的权限。 - Maxim Paperno
在我的情况下(Ubuntu 18.04),似乎在线安装程序强制我安装 Qt Creator 7,这需要使用 Qt 6(即 Qt 6 不兼容 18.04 LTS)。 - CroCo

3

如果有其他人在Mac OS X上使用最新的Qt6和Qt Creator 4.14遇到类似的问题,请注意以下内容。 命令中的sdktool路径是错误的。在Qt\ Creator.app/Contents/Resources/libexec/中手动创建一个符号链接(sdktool在其父文件夹中),它应该可以正常工作。


我能够运行建议的命令,这些命令与此答案相似,以解决问题: cd "$HOME/Qt/Qt Creator.app/Contents/Resources/libexec/" ln -s ../sdktool - fallerd

0

我曾经遇到过类似的问题。但是我的问题是由于我使用的Qt Creator版本过旧,在$HOME/Qt/Qt Creator.app/Contents/Resources/下没有libexec文件夹。因此,如果你也遇到了这个问题,我建议你更新Qt Creator。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接