如何在 Red Hat 5.3 中将 fontconfig 更新到较新版本?

发布于 2024-08-26 13:34:02 字数 234 浏览 7 评论 0原文

我想将 fontconfig 更新到较新的版本,但操作系统似乎仍在寻找旧的 fontconfig,我需要较新的版本来构建 qt。如何让 Red Hat 5.3 查看更新版本?我不知道这是否有帮助,但是当我搜索 fontconfig 时,我在名为 cache 的文件夹中发现了一些文件。当我执行 yum update 时,它​​告诉我一切都是最新的,但该版本太旧并且缺少 FcFreeTypeQueryFace。如果这是错误的网站,请给我留言,我会更改它。

I want to update fontconfig to a newer version but it seems that the OS is still finding the old fontconfig and I need the newer version to build qt. How do I make Red Hat 5.3 see the newer version? I do not know if this helps but when I did a search for fontconfig I found some files in a folder called cache. When I do yum update it tells me everything is up to date but that version is too old and is missing FcFreeTypeQueryFace. Just send me a comment if this is wrong site and ill change it.

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

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

发布评论

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

评论(2

篱下浅笙歌 2024-09-02 13:34:02

如果您在 RHEL 或 CentOS 5.x 下遇到此错误:

/home/esutton/qtsdk-2010.02/qt/lib/libQtGui.so: undefined reference to `FcFreeTypeQueryFace'
collect2: ld returned 1 exit status

显然 libQtGui.so 尝试使用 libfontconfig“FcFreeTypeQueryFace”方法失败。
在版本 2.4.2 之前,它要么不存在,要么签名可能在版本 2.4.2 中已更改。
不确定是哪个,但需要安装更新版本才能:
'''/usr/lib/libfontconfig.so.1'''

如何修复

下载源代码并配置安装在期望找到它的位置:

cd /usr/src
wget http://fontconfig.org/release/fontconfig-2.4.2.tar.gz
tar -zxf fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
./configure -prefix=/usr
make
make install <- Run as root or use sudo

执行此操作后,您不会< /strong> 需要将 fontconfig 库位置添加到 Qt 项目的 .pro 文件中。

LIBS += -L/opt/fontconfig-2.4.2/lib

这在 RHEL 5.3 上对我有用。我希望这有帮助!

-埃德

If you get this error under RHEL or CentOS 5.x:

/home/esutton/qtsdk-2010.02/qt/lib/libQtGui.so: undefined reference to `FcFreeTypeQueryFace'
collect2: ld returned 1 exit status

Apparently libQtGui.so fails trying to use the libfontconfig `FcFreeTypeQueryFace' method.
Prior to version 2.4.2 it either did not exist or perhaps the signature was changed in version 2.4.2.
Not sure which, but an updated version needs to be installed to:
'''/usr/lib/libfontconfig.so.1'''

How to Fix

Download sources and configure to install where it expects to find it:

cd /usr/src
wget http://fontconfig.org/release/fontconfig-2.4.2.tar.gz
tar -zxf fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
./configure -prefix=/usr
make
make install <- Run as root or use sudo

After doing this, you do not need to add the fontconfig library location to your Qt project’s .pro file.

LIBS += -L/opt/fontconfig-2.4.2/lib

This has worked for me on RHEL 5.3. I hope this helps!

-Ed

不寐倦长更 2024-09-02 13:34:02

您需要

  • 找到一个 rpm,可能是非 Red Hat 特定的,带有更新版本的 fontconfig 并安装它。例如,尝试 rpm.pbone.net

或者

  • ,获取源代码并自行构建和安装。如果您的系统上有依赖于现有 fontconfig rpm 的软件,那么您将无法卸载 yum 提供的版本。如果是这种情况,则不必费心构建过程的安装部分,只需构建它并将其保留在原处即可。然后,您必须确保本地构建版本的路径是编译 Qt 时使用的路径。我并不是说所有这些都会起作用,但如果没有 rpm 选项,这就是我自己要做的事情。

You need to either

  • find an rpm, perhaps a non Red Hat specific one, with a more recent build of fontconfig and install that. Try rpm.pbone.net for example.

or

  • alternatively, get the source and build and install it yourself. If there is software on your system that depends on the existing fontconfig rpm then you won't be able to uninstall the version yum has given you. If that's the case then don't bother with the install part of the build process, just build it and leave it where it is. Then you'll have to make sure that the path to your locally built version is the one used when compiling Qt. I'm not saying all that will work but that's what I'd aim to do myself if there was no rpm option.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文