相关文章推荐
飘逸的烈马  ·  Skyline 渲染引擎 / 从 ...·  1 周前    · 
玩命的猴子  ·  finder中文件排序date ...·  1 年前    · 
沉稳的萝卜  ·  anaconda 安装pymysql-掘金·  1 年前    · 

Linux安装libX11-devel

0 人关注

我试图在RedHat 7中构建QT4(从Redhat 5移植到7,使用升级的gcc编译器),我得到一个错误,说 X11/Xlib.h 找不到。总之,在做了一些研究之后,大多数人说要安装 libX11-devel 来获得那些x11库。由于我使用的是一台离线机器,我不能使用 "apt-get "类型的命令,必须手动安装RPM。所以,我去找我的RH-7安装DVD,得到了 "libX11-devel-1.6.3-3.el7.x86-64" (我有64位操作系统),并试图用 "yum install libX11-devel-1.6.3-3.el7.x86_64" 来安装,但我得到了依赖性错误。它说

...Requires: pkgconfig(kbproto)
...Required: pkgconfig(xcb)
...Requires: pkgconfig(xproto)
...Requires: pkgconfig(xcb) >= 1.1.92

因此,我的问题如下。

1)当它说"pkgconfig(kbproto)"时,它是说找到"kbproto....RPM"并做一个"yum install"。在我的dvd中,我只有"xorg-x11-proto-devel-7.7.13.el7.noarch.rpm"。既然是64位的机器,我是否必须以某种方式找到"xorg-x11-proto......x86_64.rpm"

2) "yum install"pkgconfig "install"之间有什么区别吗?在Linux中是否有其他的安装变体?

3)对于离线机器,是否有办法让我得到所有的依赖并一次性安装所有的东西?

4)为什么它说"xcb"需要两次。如果我只是得到一个高于1.1.92的xcb...rpm版本,我可以只安装一次吗?

linux
offline
yum
pkg-config
nmr
nmr
发布于 2018-10-17
2 个回答
omajid
omajid
发布于 2018-10-17
已采纳
0 人赞同

在实际回答问题之前,我建议先看看你是否能得到最新版本的软件包。安装DVD上的软件包可能真的过时了,并且包含已知的漏洞,以及其他错误。你是否可以使用【替换代码0- 来下载最新的版本到一个单独的DVD上,并将其作为安装源?请看 https://access.redhat.com/solutions/10154 欲了解更多信息。

要回答这些问题本身。

  • 替换代码1】可以指一个包 foo 或一个 "功能" foo 。替换代码4】是一个 "功能"(或虚拟要求)。你可以用 yum / rpm 来看看是什么提供的。例如,在我的Fedora盒子上, rpm -q --provides xorg-x11-proto-devel 显示这个软件包确实提供了 pkgconfig(kbproto)

    至于 x86_64 noarch ,这并不重要。替换代码10】包在任何地方都能工作。其他软件包则被限制在平台上。因此, x86_64 只在intel/amd x86 64位机器上工作。在你的情况下,安装 noarch 应该没有问题。但如果你只有一个 i686 包,那就不够了。你必须找到一个 x86_64 noarch 包。

  • 是的, yum pkg-config 之间有很大区别。他们是 completely 不同的东西。一个是安装RPM包的系统工具。另一个是为开发人员提供的工具,用于使用正确的头文件和编译器标志。如果你关心的是寻找/安装RPM,不要直接使用 pkg-config

  • 你可以使用一台可以访问RHEL 7 yum软件库的在线机器吗?在那台机器上,做这样的事情。

    mkdir rhel7-packages cd rhel7-packages yum provides '*/X11/Xlib.h' # make a note of the package that provides this file. it's libX11-devel on Fedora here yumdownloader --resolve libX11-devel # download libX11-devel and all dependencies not installed on the system

    然后在没有互联网接入的机器上复制/安装RPMs。

  • It's probably printing out xcb twice because it's two different requirements. The unversioned requirement will be satisfied if you install any verison of xcb. The versioned requirement will only be satisfied if you install 1.1.92. If you install 1.1.92, it will satisified both the requirements.
  • nmr
    非常感谢你。它确实起作用了。基本上,我必须找到有pkgconfig(xcb)和pkgconfig(kbproto)的RPMs并安装它。"XCB "rpm有另一个对 "xau "的依赖,我也不得不安装它。
    iamauser
    iamauser
    发布于 2018-10-17
    0 人赞同
    你必须解决你正在构建软件包的系统上的依赖性。这意味着你需要安装这些依赖项,包括 libX11-devel 。要做到这一点,从EL7 repos手动下载RPM到本地磁盘,然后运行这个。

    $ mkdir -p /tmp/libX11_dep_rpms && cd /tmp/libX11_dep_rpms
    # Download all dependencies from here. All your packages should be available here:
    # http://mirror.centos.org/centos-7/7/os/x86_64/Packages/
    # Then install
    $ yum localinstall *.rpm
    # After this you should be able to build your qt4 package, provided all dependencies are resolved. Otherwise, repeat the procedure for all dependencies
    # If you can't download packages, then you need to create a FULL DVD ISO that will contain all packages.
    替换代码2】确保需求来自于一个提供特定版本库的特定构建。Here是一些细节。