Linux 在不使用 yum 的情况下在 64 位 RHEL 上安装 32 位库 (glibc)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15435751/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing 32 bit libraries (glibc) on 64 bit RHEL without using yum
提问by user2150250
I'm trying to get a 32-bit application to run on 64 bit RHEL 6.1, and the machine does not have access to the internet. Is there any way to install 32 bit glibc on 64 bit RHEL without using yum, i.e. just using RPM installs? I grabbed the glibc-*i686.rpm and many of its dependencies from the RHEL 6.1 ISO including nss-softokn-freebl*i686.rpm, but I still can't get it to install without ignoring dependencies (rpm --nodeps).
我正在尝试让 32 位应用程序在 64 位 RHEL 6.1 上运行,但机器无法访问互联网。有没有办法在不使用 yum 的情况下在 64 位 RHEL 上安装 32 位 glibc,即只使用 RPM 安装?我从 RHEL 6.1 ISO 中获取了 glibc-*i686.rpm 及其许多依赖项,包括 nss-softokn-freebl*i686.rpm,但我仍然无法在不忽略依赖项的情况下安装它 (rpm --nodeps)。
回答by suprjami
Mount the install DVD:
挂载安装 DVD:
mkdir -p /mnt/RHEL
mount /dev/cdrom /mnt/RHEL
Or if you just have the ISO, you can use that instead:
或者,如果您只有 ISO,则可以使用它:
mkdir -p /mnt/RHEL
mount -o loop /path/to/RHEL.iso /mnt/RHEL
Now make a Yum repository which uses the DVD as a repository:
现在制作一个使用 DVD 作为存储库的 Yum 存储库:
/etc/yum.repos.d/rhel-dvd.repo
[rhel-dvd]
name=Red Hat Enterprise Linux $releasever - $basearch - DVD
baseurl=file:///mnt/RHEL/Server/
enabled=1
gpgcheck=0
You should now be able to clean the yum cache, and install the 32-bit C library:
您现在应该能够清理 yum 缓存,并安装 32 位 C 库:
yum clean all
yum install glibc.i686
You'll see plenty of similar guides telling you to install and run the createrepocommand but you don't need to do that. The RHEL disc already is a repository, it already has the /repodata/repomd.xmlfile which defines a repository.
你会看到很多类似的指南告诉你安装和运行createrepo命令,但你不需要这样做。RHEL 光盘已经是一个存储库,它已经具有定义存储库的/repodata/repomd.xml文件。
However, if you take the RPM files on the RHEL disc and copy them somewhere else and start adding your own packages thenyou need createrepo to build the metadata for the new repository you have created.
但是,如果您将 RHEL 光盘上的 RPM 文件复制到其他地方并开始添加您自己的包,那么您需要 createrepo 为您创建的新存储库构建元数据。