centos查看一个命令应该安装哪个包
有时候缺少命令,但是又不知道安装哪个包,可以使用如下进行查找
dnf -q provides '*/vim'
yum provides '*/vim'
这两个命令效果一样
比如我们需要安装vim,那么可以查询一下,得到如下结果
vim-common-2:8.0.1763-15.el8.x86_64 : The common files needed by any version of the VIM editor
Repo : AppStream
Matched from:
Filename : /usr/share/vim
vim-common-2:8.0.1763-16.el8.x86_64 : The common files needed by any version of the VIM editor
Repo : @System
Matched from:
Filename : /usr/share/vim
vim-common-2:8.0.1763-16.el8.x86_64 : The common files needed by any version of the VIM editor
Repo : appstream
Matched from:
Filename : /usr/share/vim
vim-enhanced-2:8.0.1763-15.el8.x86_64 : A version of the VIM editor which includes recent enhancements
Repo : AppStream
Matched from:
Filename : /usr/bin/vim
vim-enhanced-2:8.0.1763-16.el8.x86_64 : A version of the VIM editor which includes recent enhancements
Repo : @System
Matched from:
Filename : /usr/bin/vim
vim-enhanced-2:8.0.1763-16.el8.x86_64 : A version of the VIM editor which includes recent enhancements
Repo : appstream
Matched from:
Filename : /usr/bin/vim
上面列出了可以安装的包vim-common
vim-enhanced
都可以安装得到vim
上面语句的意思就是查找提供安装路径为*/vim的包,这是一个通配符,与上面的Filename匹配
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
2020-08-10 编译opencv和opencv_contrib