Ubuntut18.04.5安装qt4.8.7库!

1 编译器降级 (gcc7.5貌似也行)

 

 2 下载qt src包。

3 编写配置脚本

./configure -prefix /home/wss/work/QtSrc/pc-qt4.8.7 -opensource \
-confirm-license \
-fontconfig \
-shared \
-fast \
-optimized-qmake \
-qt-libjpeg \
-qt-zlib \
-qt-libpng \
-qt-freetype \
-no-qt3support \
-no-libtiff \
-no-libmng \
-no-opengl \
-no-mmx \
-no-sse \
-no-sse2 \
-no-3dnow \
-no-openssl \
-no-webkit \
-no-qvfb \
-no-phonon \
-no-nis \
-no-cups \
-no-glib \
-nomake tools \
-nomake docs \
-qt-sql-sqlite \
-plugin-sql-sqlite \
-nomake examples \
-nomake demos

执行 sudo apt-get install libx11-dev libxext-dev libxtst-dev

执行脚本。

如果报错FontConfig support cannot be enabled, due to functionality tests! 则安装apt-get install libfontconfig1-dev。然后重新编译源码即可。

4 make & make install

5 把需要的字体放到/lib/fonts文件夹下。

posted @ 2021-12-31 10:57  不明白就去明白  阅读(556)  评论(0编辑  收藏  举报