首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用script选项安装qt5.11 headles

使用script选项安装qt5.11 headles
EN

Stack Overflow用户
提问于 2018-08-18 23:29:01
回答 3查看 2.1K关注 0票数 7

我的目标是在运行jenkins2的无头ubuntu服务器18.04.1上安装Qt 5.11.1。

我目前正在一个运行ubuntu桌面18.04的虚拟机器上测试我当前的脚本。请注意,如果使用gui安装程序手动安装,则安装或运行qt没有问题。

当尝试使用免费的安装程序gui安装qt时,我在使用终端运行时遇到以下问题。

代码语言:javascript
运行
复制
./qt-opensource-linux-x64-5.11.1.run --script qt-installer-noninteractive.qs --platform minimal --verbose
or
./qt-unified-linux-x64-3.0.5-online.run --script qt-installer-noninteractive.qs --platform minimal --verbose

...
...
[9732] Warning: Other components depend on component qt.tools which has child components. This will not work properly.
[9745] Warning: Component qt.qt5.5111 depends on other components while having child components. This will not work properly.

当进程完成时,会创建一个包含qtcreator的Qt文件夹,但不包含任何qt库。

qt-installer-noninteractive.qs

代码语言:javascript
运行
复制
function Controller() {
    installer.autoRejectMessageBoxes();
    installer.installationFinished.connect(function() {
        gui.clickButton(buttons.NextButton,3000);
    })
}

Controller.prototype.WelcomePageCallback = function() {
    gui.clickButton(buttons.NextButton,3000);
}

Controller.prototype.CredentialsPageCallback = function() {
    gui.clickButton(buttons.NextButton,3000);
}

Controller.prototype.IntroductionPageCallback = function() {
    gui.clickButton(buttons.NextButton,3000);
}

Controller.prototype.TargetDirectoryPageCallback = function()
{
    gui.currentPageWidget().TargetDirectoryLineEdit.setText(installer.value("HomeDir") + "/Qt");
    gui.clickButton(buttons.NextButton,3000);
}

Controller.prototype.ComponentSelectionPageCallback = function() {
    var widget = gui.currentPageWidget();

    widget.deselectAll();

// pretty sure the line below is the problem, but cant find a list over the proper paths to use for linux.

    widget.selectComponent("qt.5111.gcc_64");  
    //widget.selectComponent("qt.55.qtquickcontrols");

    // widget.deselectComponent("qt.tools.qtcreator");
    // widget.deselectComponent("qt.55.qt3d");
    // widget.deselectComponent("qt.55.qtcanvas3d");
    // widget.deselectComponent("qt.55.qtlocation");
    // widget.deselectComponent("qt.55.qtquick1");
    // widget.deselectComponent("qt.55.qtscript");
    // widget.deselectComponent("qt.55.qtwebengine");
    // widget.deselectComponent("qt.extras");
    // widget.deselectComponent("qt.tools.doc");
    // widget.deselectComponent("qt.tools.examples");

    gui.clickButton(buttons.NextButton,3000);
}

Controller.prototype.LicenseAgreementPageCallback = function() {
    gui.currentPageWidget().AcceptLicenseRadioButton.setChecked(true);
    gui.clickButton(buttons.NextButton,10000);
}

Controller.prototype.StartMenuDirectoryPageCallback = function() {
    gui.clickButton(buttons.NextButton,3000);
}

Controller.prototype.ReadyForInstallationPageCallback = function()
{
    gui.clickButton(buttons.NextButton,3000);
}

Controller.prototype.FinishedPageCallback = function() {
var checkBoxForm = gui.currentPageWidget().LaunchQtCreatorCheckBoxForm
if (checkBoxForm && checkBoxForm.launchQtCreatorCheckBox) {
    checkBoxForm.launchQtCreatorCheckBox.checked = false;
}
    gui.clickButton(buttons.FinishButton);
}

我已经使用了以下资源,但没有任何运气。

stack overflow: silent Qt install

Qt installer no interactive installer documentation

stack overflow, Silent install for Windows listing a set of commands

EN

回答 3

Stack Overflow用户

发布于 2018-08-19 18:13:24

要获取qt 5.11.1的二进制组件,需要添加正确的路径

代码语言:javascript
运行
复制
widget.selectComponent("qt.qt5.5111.gcc_64"); 
票数 4
EN

Stack Overflow用户

发布于 2018-12-02 09:06:49

这个脚本从来没有为我工作过(或者我太傻了,不会使用它),但是我写了一个或多或少简单的python脚本,它基本上和官方的Qt安装程序做的一样。你可以在here上找到它。

下面是安装和运行依赖项的方法:

代码语言:javascript
运行
复制
sudo apt install python3-requests p7zip-full wget

wget https://git.kaidan.im/lnj/qli-installer/raw/master/qli-installer.py
chmod +x qli-installer.py

./qli-installer.py 5.11.3 linux desktop

在本例中,可以在./5.11.3/gcc_64/中找到Qt安装。对于其他系统/目标(即linux android android_armv7),这当然会有所不同。

票数 2
EN

Stack Overflow用户

发布于 2019-06-11 15:36:19

您只需通过ssh将X转发到本地计算机即可。

请参阅https://www.businessnewsdaily.com/11035-how-to-use-x11-forwarding.html

例如ssh -X root@headless_server_ip

运行./qt-unified-linux-x64-3.1.1-online.run,安装程序GUI将在您的ssh客户机(具有X服务器)上弹出。按照安装步骤和..瞧..。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51910107

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档