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

相关推荐
chao18984416 小时前
基于 SPEA2 的多目标优化算法 MATLAB 实现
开发语言·算法·matlab
赏金术士16 小时前
Kotlin 习题集 · 高级篇
android·开发语言·kotlin
楼兰公子17 小时前
buildroot 在编译rust时裁剪平台类型数量的方法
开发语言·后端·rust
吴声子夜歌18 小时前
Go——并发编程
开发语言·后端·golang
ooseabiscuit18 小时前
Laravel4.x:现代PHP框架的奠基之作
java·开发语言·php
c1s2d3n4cs19 小时前
Qt模仿nlohmann::json进行序列化和反序列化
开发语言·qt·json
AiTop10019 小时前
Claude Code 推出 Agent View:命令行编程正式进入“多线程并发“时代
开发语言·人工智能·ai·aigc
jf加菲猫19 小时前
第21章 Qt WebEngine
开发语言·c++·qt·ui
码农-阿杰20 小时前
深入理解 synchronized 底层实现:从 HotSpot C++ 源码看对象锁与 Monitor 机制
开发语言·c++·
2401_8322981020 小时前
AI智能体监管落地,OpenClaw率先建立行业合规标准
开发语言