使用 Yum 指定可重定位 RPM 的安装位置 [英] Specify the install location for a relocatable RPM using Yum

查看:73
本文介绍了使用 Yum 指定可重定位 RPM 的安装位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用本网站中的说明创建了一个可重定位的 RPM:http://www.cyberciti.biz/faq/rpm-relocatable-packages/

I have created a relocatable RPM using the instructions in this website: http://www.cyberciti.biz/faq/rpm-relocatable-packages/

这意味着我可以将包安装到它的默认位置,/opt/app,使用

This means that I can install the package into its default location, /opt/app, using

rpm -ivh mypackage.rpm

但是,如果我决定将软件包安装到/usr/local/bin 中,我可以使用以下方式安装它:

However, if I decide that I weant the package to be installed into /usr/local/bin instead, I can install it using:

rpm -ivh --prefix=/usr/local/bin mypackage.rpm

所有这一切都完美无缺.但是,我需要通过 Yum 安装包.如何将 --prefix 参数传递给 Yum?

All of this works perfectly. However, I need to install the package via Yum. How do I pass the --prefix argument to Yum?

推荐答案

我不相信这是可能的,并且快速在线搜索似乎同意.包括 2007 年的 this 邮件列表线程.我认为,塞思·维达尔的回答是主要的.重定位会导致基于文件的依赖项跟踪出现问题,至少在当时,没有什么需要处理的.

I don't believe this is possible and a quick online search seems to concur. Including this mailing list thread from 2007. The point that Seth Vidal makes in his reply is, I think, the main one. Relocations cause problems for file-based dependency tracking which, at least at the time, nothing bothered to handle.

话虽如此,我认为可重定位 RPM 的实用性可能不是很高,因为构建一个可以正常运行的 RPM 很困难,因为无法依赖文件位置使得许多(通常是微不足道的)编程操作变得相当困难.

That being said I think the utility of relocatable RPMs is likely not very high as building one that functions correctly is difficult as not being able to depend on file locations makes many (normally trivial) programmatic operations quite difficult.

这篇关于使用 Yum 指定可重定位 RPM 的安装位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆