debian13 编译源码qt5.15.18

下载源码

国内源下载

解压文件

源码目录创建个新文件夹

进入新文件夹

执行

cd build/

../configure -prefix /usr/local/lib/qt5.15.18 -opensource -confirm-license -qt-sqlite -qt-pcre -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -skip qtwebengine -nomake tests -nomake examples -mp -release -optimize-size -strip

../configure -prefix /usr/local/lib/qt5.15.18 -opensource -confirm-license -qt-sqlite -qt-pcre -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -skip qtwebengine -nomake tests -nomake examples -mp -release -no-fetaure-mapboxgl -no-opengl -force-debug-info -optimize-size -strip

../configure -prefix /usr/local/lib/qt5.15.18 -opensource -confirm-license -qt-sqlite -qt-pcre -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -skip qtwebengine -nomake tests -nomake examples -mp -release -no-opengl -skip qt3d -skip qtlocation -force-debug-info

如果上步执行失败

需要手动删除.config.cache

make distclean

复制代码
make clean
清除上次的make命令所产生的object文件(后缀为“.o”的文件)及可执行文件。
make distclean
类似make clean,但同时也将configure生成的文件全部删除掉,包括Makefile。

实在不行,就删除解压的代码文件,重新解压出来

config 结束后

执行

复制代码
make -j$(nproc--ignore 2)

添加安装目录到环境变量

export PATH=$PATH:/usr/sbin

export PATH=/usr/local/lib/qt5.15.18/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/lib/qt5.15.18/lib:$LD_LIBRARY_PATH

刷新一下

source /.bashrc

验证安装完成

qmake -version

相关推荐
萧瑟余晖3 小时前
JDK 26 新特性详解
java·开发语言
马优晨4 小时前
Freemarker 完整讲解(后端 Java 模板引擎)
java·开发语言·freemarker·freemarker 完整讲解·freemarker模板引擎
人邮异步社区6 小时前
怎么把C语言学到精通?
c语言·开发语言
心平气和量大福大6 小时前
C#-WPF-控件-TextBox 数据绑定
开发语言·c#·wpf
ttwuai7 小时前
Cursor 生成 CRUD 后,Go 后台接口别只测 200:JWT、RBAC 和 tenant_id 怎么验
开发语言·后端·golang
এ慕ོ冬℘゜7 小时前
前端基础:什么是时间戳?JS获取时间戳三种方法与实战用途
开发语言·前端·javascript
执明wa7 小时前
LayoutInflater详解: XML是如何变成View的?
android·xml·开发语言·android studio
一次旅行7 小时前
Python+大模型端到端自动化日报系统
开发语言·python·自动化
噢,我明白了8 小时前
java中Excel的导入和导出(EasyExcel)
java·开发语言·excel
mabing9939 小时前
Qt 生成条纹图
开发语言·qt