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

相关推荐
C^h7 小时前
c++ string
开发语言·c++
raindayinrain8 小时前
c++高性能--原子操作,无锁编程,操作顺序
开发语言·c++·性能优化
学逆向的8 小时前
C++ 合并命名空间
开发语言·c++·网络安全
Zhao-Jichao8 小时前
VS2026 打包 C++ 程序生成 EXE,借助 Installer Project 扩展工具
开发语言·c++
学逆向的9 小时前
C 局部静态变量
c语言·开发语言·网络安全
小徐不徐说9 小时前
C++ 接口与插件设计:从工厂注册到 Qt 动态插件
数据库·c++·qt·系统架构·程序设计
大都督会赢的9 小时前
C++第一节课
开发语言·c++
“AI国潮设计-小江”9 小时前
【AIGC实战】Python+Stable Diffusion打造“英歌舞财神”IP,解锁“马到成功”等爆款情绪营销文案设计
开发语言·人工智能·python·prompt·aigc
小王C语言9 小时前
Qt常用控件:容器类控件,标题分组框、标签页(浏览器标签)
开发语言·qt
TMedical10 小时前
MedPlanning 截骨模拟矫形功能
c++·图像处理·人工智能·qt·健康医疗