在 Fedora ostree 系统上搜索软件包 | Linux 中国
本文字数:2117,阅读时长大约:2分钟
本文介绍如何使用 rpm-ostree 查找要添加到基于 ostree 的系统(例如 Silverblue 和 Kinoite)的应用。
基于 Fedora ostree 的系统的主要优点之一是系统的不可变性。该镜像不仅是只读的,而且是预先构建在 Fedora 服务器上的。因此,更新正在运行的系统会下载更新增量(即仅差异)并修补系统。这使得许多安装在默认情况下都是相同的。
对于大多数人来说,预构建的镜像就足够了,因为通常鼓励用户同时使用 Flatpak 安装应用,使用工具箱进行开发任务。但是,如果特定应用不符合此要求并且用户需要在主机系统上安装应用怎么办?
在这种情况下,可以选择在系统上覆盖软件包,在本地创建一个新的镜像,在标准镜像上添加软件包。
但是,我如何知道我要安装哪个包?搜索功能怎么样?
老方法(toolbox + dnf search)
虽然始终可以通过支持 PackageKit 的软件中心(例如 GNOME “软件” 应用 或 KDE “发现” 应用)搜索软件包,但通过 CLI 来搜索软件包有点困难。
由于
rpm-ostree
不曾提供搜索命令,因此常见的搜索方式是使用 toolbox enter
进入工具箱并使用 dnf search <搜索词>
进行搜索。这样做的缺点是需要在工具箱中启用相同的仓库才能获得正确的搜索结果。搜索
neofetch
的示例:$ toolbox enter
<Note that at this point the toolbox command might request creating a toolbox, which might involve downloading a container image>
⬢[fedora@toolbox ~]$ dnf search neofetch
<snip>
===NameExactlyMatched: neofetch ===
neofetch.noarch : CLI system information tool written inBash
===SummaryMatched: neofetch ===
fastfetch.x86_64 :Like neofetch, but much faster because written in c
新方法(rpm-ostree search)
rpm-ostree search *kernel
要使用搜索命令,请首先确保你使用的是
rpm-ostree
2023.6 或更高版本:$ rpm-ostree --version
rpm-ostree:
Version:'2023.8'
Git:9a99d0af32640b234318815a256a2d11e35fa64c
Features:
- rust
- compose
- container
- fedora-integration
如果满足版本要求,你应该能够运行
rpm-ostree search <搜索词>
。这是一个使用
rpm-ostree search
搜索 neofetch
的示例:$ rpm-ostree search neofetch
=====NameMatched=====
neofetch : CLI system information tool written inBash
=====SummaryMatched=====
fastfetch :Like neofetch, but much faster because written in c
(题图:DA/5d27838e-6068-46a6-9bca-4ec486d65c46)
最新评论
推荐文章
作者最新文章
你可能感兴趣的文章
Copyright Disclaimer: The copyright of contents (including texts, images, videos and audios) posted above belong to the User who shared or the third-party website which the User shared from. If you found your copyright have been infringed, please send a DMCA takedown notice to [email protected]. For more detail of the source, please click on the button "Read Original Post" below. For other communications, please send to [email protected].
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。