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

查看:1038
本文介绍了使用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 /使用

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年的邮件列表主题。 Seth Vidal在他的回答中,我认为,主要的。重定位会导致基于文件的依赖关系跟踪的问题,至少在当时,没有什么打扰处理。

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的实用程序可能不非常高,因为构建一个正常工作是困难的,因为不能依赖文件位置使许多(通常微不足道的)程序化操作非常困难。

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天全站免登陆