Qt项目发行版ubuntu-加载共享库时出错:libQt5Widgets.so.5 [英] Qt project release ubuntu - error while loading shared libraries: libQt5Widgets.so.5

查看:173
本文介绍了Qt项目发行版ubuntu-加载共享库时出错:libQt5Widgets.so.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将用Qt编写的项目发布给Ubuntu/Linux用户.如果他们尝试执行构建发行版,则会收到此错误消息,因为他们尚未安装Qt:

I want to release my project written with Qt to a Ubuntu / Linux user. If they try to execute the build release version they get this error message, because they have not installed Qt:

加载共享库时出现

错误:libQt5Widgets.so.5:无法打开共享对象文件:没有这样的文件或目录

error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory

有没有办法将所有库(例如 libQt5Widgets.so.5 )添加到可执行文件所在的文件夹中,就像在Windows下使用 qt.conf 一样,您可以在哪里指定插件文件夹?

Is there a way to add all the libraries such as libQt5Widgets.so.5 to the folder where the executable is, just like under Windows with qt.conf, where you can specify the Plugins folder?

推荐答案

使用Ubuntu的程序包管理系统打包项目可能是最简单的.安装项目后,Qt依赖项将由程序包管理器自动安装.只要在Ubuntu的软件包存储库中有可用的Qt 5版本,那将是最好的解决方法.它将为您节省很多痛苦.

It may be simplest to package the project using Ubuntu's package management system. The Qt dependency will then be automatically installed by the package manager when your project is installed. That'd be the best way to go about it, as long as there is a version of Qt 5 available in Ubuntu's package repository. It'll save you a whole lot of grief.

这篇关于Qt项目发行版ubuntu-加载共享库时出错:libQt5Widgets.so.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆