为什么yum可以用不同的名字安装同一个包
在 Centos 6 上,我可以执行
# yum install webserver
或
# yum install httpd
,这两个命令都会安装 httpd (apache)
我正在构建一个 RPM,但我不知道应该使用哪一个,也不知道它们为什么不同。 包是否有一个可以用来寻址的“通用”名称?例如,如果您安装了lighttpd,它可以提供网络服务器包吗?
On Centos 6 I can do
# yum install webserver
or
# yum install httpd
And both commands will install httpd (apache)
I am building an RPM and I don't know which one I should use or why they are different.
Do packages have a 'generic' name that you can address them by? For instance if you had lighttpd installed it could provide the webserver package?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
RPM 提供了很多东西。无论是本机库引用、perl 模块等。所有这些都是在构建 RPM 时计算的。
但是您也可以在规范文件(用于构建 RPM 的文件)中自行提供内容,如下所示:
因此,这意味着
httpd
包在其规范文件中具有:。
您可以查询已安装的软件包提供了什么:
但您也可以询问哪个软件包提供了某些内容:
最后,您可以询问 yum 有关提供的信息:
An RPM provides many things. Be they native library references, perl modules, etc. All are calculated while the RPM is built.
But you can also provide things yourself in a spec file (the file used to build an RPM), as in:
So, it means the
httpd
package has:in its spec file.
You can query what an installed package provides with:
But you can also ask what package provides something:
Finally, you can ask yum about provides: