当我构建其他人的代码时,它显示“在 pkg-config 搜索路径中找不到软件包 Qt5Gui”,但我安装了它

发布于 2025-01-13 12:43:46 字数 910 浏览 2 评论 0原文

我已经安装了Qt 5.1.4,但是当我“make install”时,它显示

Package Qt5Gui was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Gui.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Gui' found
Package Qt5Widgets was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Widgets.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Widgets' found
Package Qt5Multimedia was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Multimedia.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Multimedia' found

但是我安装了这个软件qt-opensource-linux-x64-5.14.0.run,之后我试图找到它们,我运行了 locate Qt5Gui 但没有返回 Qt5Gui.pc,那么我如何在我的设备上获取 Qt5*.pc ubuntu 20.04 ?

I have installed Qt 5.1.4 but when I 'make install' it shows

Package Qt5Gui was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Gui.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Gui' found
Package Qt5Widgets was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Widgets.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Widgets' found
Package Qt5Multimedia was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Multimedia.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Multimedia' found

But I installed this software qt-opensource-linux-x64-5.14.0.run, after I tried to find them I ran locate Qt5Gui but no Qt5Gui.pc returned,so how can i get Qt5*.pc on my ubuntu 20.04 ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

执妄 2025-01-20 12:43:46

我开始的安装还少了几个包

完整的安装应该是这样的


sudo apt install qtmultimedia5-dev qt5-default -y

qt编译环境的搭建需要的不仅仅是从官网下载的安装包

它对我有用!

现在我可以找到 Qt5*.pc

The installation I started was missing a few more packages

The complete installation should look like this


sudo apt install qtmultimedia5-dev qt5-default -y

The construction of the qt compilation environment requires more than the installation package downloaded from the official website

It worked for me !

Now i can find the Qt5*.pc !

油饼 2025-01-20 12:43:46

您需要安装 qtbase5-dev 它是 qt5-default

参见:https://packages.ubuntu.com/bionic/amd64/qtbase5-dev/filelist< /a>

编辑:您可能还需要安装包 qtmultimedia5-dev

You need to install qtbase5-dev which is part of qt5-default

see: https://packages.ubuntu.com/bionic/amd64/qtbase5-dev/filelist

EDIT: you may also have to install the package qtmultimedia5-dev.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文