yum whatprovidesyum 查询 已安装的解释

包管理之包查询,包校验,rpm数据库.yum的详细用法及说明 | Linux运维部落
rpm {-q|–query} [select-options] [query-options]
[select-options]
-a: 所有包
-f: 查看指定的文件由哪个程序包安装生成
-p rpmfile:针对尚未安装的程序包文件做查询操作;
–whatprovides CAPABILITY:查询指定的CAPABILITY由哪个包所提供
–whatrequires CAPABILITY:查询指定的CAPABILITY被哪个包所依赖
rpm2cpio 包文件|cpio–itv预览包内文件
rpm2cpio 包文件|cpio–id “*.conf”释放包内文件
[query-options]
–changelog:查询rpm包的changelog
-c: 查询程序的配置文件
-d: 查询程序的文档
-i: information
-l: 查看指定的程序包安装后生成的所有文件;
–scripts:程序包自带的脚本片断
-R: 查询指定的程序包所依赖的CAPABILITY;
–provides: 列出指定程序包所提供的CAPABILITY;
查询用法:
-qi PACKAGE, -qf FILE, -qc PACKAGE, -ql PACKAGE, -qd PACKAGE
-qpi PACKAGE_FILE, -qpl PACKAGE_FILE, …
rpm {-e|–erase} [–allmatches] [–nodeps]不考虑依赖性
[–noscripts] [–notriggers] [–test] PACKAGE_NAME …
rpm {-V|–verify} [select-options] [verify-options]
S file Size differs
M Mode differs (includes permissions and file type)
5 digest (formerly MD5 sum) differs
D Device major/minor number mismatch
L readLink(2) path mismatch
U User ownership differs
G Group ownership differs
T mTimediffers
P capabilities differ
修改一个包里面的文件
将修改过的内容改正回来
包来源合法性验正及完整性验正:
完整性验正:SHA256
来源合法性验正:RSA
公钥加密:
对称加密:加密、解密使用同一密钥;
非对称加密:密钥是成对儿的
public key: 公钥,公开所有人
secret key: 私钥, 不能公开
导入所需要公钥:
rpm -K|checksigrpmfile检查包的完整性和签名
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
CentOS 7发行版光盘提供:RPM-GPG-KEY-CentOS-7
卸载 rpm -qa gpg-pubkey*
数据库重建:
/var/lib/rpm
rpm {–initdb|–rebuilddb}
initdb: 初始化
如果事先不存在数据库,则新建之
否则,不执行任何操作
rebuilddb:重建
无论当前存在与否,直接重新创建数据库
yum 解决包依赖性的工具
CentOS: yum, dnf
YUM: YellowdogUpdate Modifier,rpm的前端程序,用来解决软件包相关依赖性,可以在多个库之间定位软件包,up2date的替代工具
yum repository: yum repo,存储了众多rpm包,以及包的相关的元数据文件(放置于特定目录repodata下)
文件服务器:
yum客户端:
&&&&&配置文件:
&&&&&&&&/etc/yum.conf
&&&&&&&&/etc/yum.conf.d/*.repo
&&&&仓库指向的定义:
&&&&[repositoryID]
&&&&name= some name for tiis&repository
&&&&baseurl=url://path.to/repository/
&&&&ecabled={1|0}& & &&&
&&&&gpgcheck={1|0}
&&&&repo_gpgcheck={1|0}
&&&&gpgkey=URL
&&&&enablegroup={1|0}
&&&&failovermethod={roundrobin|priority}
&&&&&&&&默认:roundrobin ,意为随机挑选
&&&&默认为1000
显示仓库列表
&&&&repolist [all|enabled|disabled]
显示程序包
&&&& # yum list [all|glob_exp1 [glob_exp2] […]
&&&& # yum list {available|installed|updates}[glob_exp1][…]
安装程序包:
&&&&install package1 [package2][…]
升级程序包&
&&&&update [package1][[package2][…]
检查可用升级
&&&&check-update
卸载程序包
&&&&remove | erase package1 [package2][…]
查看程序提供特性:
&&&&provides | whatprovides feature1 [feature2] […]
清理本地缓存:
&&&&clean [ packages | metadata | expire-cache | rpmdb | plugins | all ]
&&&&makecache [fast]
&&&&search string1 [string2] […]
&&&&以指定的关键字搜索程序包及summary信息
&&&&resolvedep dep1 [dep2] […]
& & & & & &(maintained for legacy reasons only – use &&&&repoquery or yum provides)
查看指定包所依赖的capabilities
&&&&deplist
查看yum事务历史
history [info|list|packages-list|packages-info|
summary|addon-info|redo|undo|
rollback|new|sync|stats]
yum history
yum history info 6
yum history undo 6
/var/log/yum.log
您还未登录,请登录后再进行相关操作!
400-080-6560
在线咨询:
工作时间:周一至周五,9:30-18:30,节假日同时也值班7被浏览1,334分享邀请回答yum search &foo&
0添加评论分享收藏感谢收起yum whatprovides yacc
上面的命令,在我的CentOS 7上输出[user1@master ~]$ yum whatprovides yacc
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.pubyun.com
* updates: mirrors.163.com
byacc-1.9..el7.x86_64 : Berkeley Yacc, a parser generator
Matched from:
: /usr/bin/yacc
byacc-1.9..el7.x86_64 : Berkeley Yacc, a parser generator
: @anaconda
Matched from:
: /usr/bin/yacc
[user1@master ~]$
发现需要安装的包是byacc4添加评论分享收藏感谢收起写回答记住我的登录信息
一份付出一分收获
明明可以过安分的生活,却偏偏有颗不安分的心。
遇到问题时,不要轻易去放弃所遇到的这个难题,解决问题的方法有很多种,主要看你动不动脑了。
如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏或者分享给其他技术爱好者
本站福利,湖南卫视在线直播。
1、通过如下格式指令进行软件的安装:
install -y &待安装软件名&
操作示例:
2、通过如下格式指令进行软件卸载:
&待卸载软件名&
操作示例:
search 来查找命令具体属于哪个包。
比如安装常用的 rz sz 软件,通过
install rz 或
install rzsz等都无法找到,通过 searh rz 即可找到,可以看到 rz sz 软件属于 lrzsz 这个包。之后再通过 yum install lrzsz 即可安装。
操作示例如下图所示:
4、通过 yum whatprovides 查找哪个包提供 SO 动态库文件。
比如在 Linux 系统中安装应用时,有时会因为缺少对应的 so 动态库文件而出现异常,比如出现如下报错内容:
error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
出现该问题似乎,首先通过 yum install -y libstdc++-4.4.7-16.el6.i686 命令检索是哪些应用提供这个动态库文件。
然后通过 yum install -y libstdc++-4.4.7-17.el6.i686 进行相应软件包的安装。
5、通过yum
clean 命令清除 yum 的缓存信息。
clean packages 清除缓存中的 RPM 包文件:
clean headers 清楚缓存中的 RPM 包头文件:
yum clean all 清楚缓存中的 RPM 包和头文件(相当于同时执行上述两条命令):
6、更多相关 YUM 的命令功能可以通过 yum —help 进行查看。
如何重装 YUM
1、卸载 yum
$ rpm -qa |grep yum |xargs rpm -e —nodeps
2、下载 yum
yum-plugin-fastestmirror yum-metadata-parser 三个包的文件,具体可以 去 或者官网下载。
$ wget $ wget $ wget
3、安装上面下载的 rpm 包。
$ rpm -ivh yum-3.2.29-73.el6.centos.noarch.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
YUM 操作常见错误处理
YUM 操作出错:Python-3.4.3: bad interpreter: Permission denied
执行 yum 命令,返回类似如下错误信息:
-bash: /bin/yum: /usr/bin/Python-3.4.3: bad interpreter: Permission denied
YUM 不支持 python3.0 以上版本。
1、登陆服务器使用 whereis python,查询当前服务器使用的 python 版本,下图为默认安装的 python,如果单独装过其他版本的 python,都会显示出来。
2、再查看 /usr/bin/yum文件,查看第一行,如果不是默认的 /usr/bin/python,而是其他高版本的 python,则会出执行yum的相关错误。
3、修改为默认的 python 版本就可以正常执行 yum 了。
下图是默认的正常情况:
YUM 更新提示:repomd.xml: [Errno 14] HTTP Error 404: Not Found
进行 YUM 源更新。
2、如果是 CentOS 5 系统的,修改 Centos-Base.repo 中的 $releasever为 5。
3、执行yum makecache.
YUM 操作提示:GPG key retrieval failed : [Errno 12] Timeout on
执行 rpm —import
YUM 操作提示:xz compression not available
该问题通常是由于安装了不兼容版本的 epel 引起的,尝试通过如下方式删除相应的 epel 包后,重新尝试操作即可:
1、输入如下指令删除错误 epel 包。
$ yum remove -y epel-release
2、清理缓存。
$ rm -rf /var/cache/yum/x86_64/6Server/epel/
3、再次执行相关指令即可。
YUM 更新出现报错:Transaction Check Error
执行 yum update 时出现类似如下错误信息:
Transaction Check Error:file /etc/pki/tls/certs/ca-bundle.crt from install of openssl-0.9.8e-36.el5_11.x86_64 conflicts with file from packageopenssl-0.9.8e-27.el5_10.4.i686
file /usr/share/man/man1/ca.1ssl.gz from install of openssl-0.9.8e-36.el5_11.x86_64 conflicts with file from packageopenssl-0.9.8e-27.el5_10.4.i686
file /usr/share/man/man1/req.1ssl.gz from install of openssl-0.9.8e-36.el5_11.x86_64 conflicts with file from packageopenssl-0.9.8e-27.el5_10.4.i686
file /usr/share/man/man1/x509.1ssl.gz from install of openssl-0.9.8e-36.el5_11.x86_64 conflicts with file from packageopenssl-0.9.8e-27.el5_10.4.i686 Error Summary openssl
根据报错中 error
相关的提示,判断该问题是在升级 OPENSSL 时出现异常所致。
处理方法如下:
1、略过这个报错包的升级,直接升级其他的软件包。执行命令如下:
yum update —exclude=openssl
// 跳过openssl的升级。
这时升级正常报错消失。
2、关于这个 openssl 包的问题,分析是冲突导致的,这时需要找出要冲突的软件 ,执行命令如下:
$ rpm -q openssl —qf ‘%{NAME} %{VERSION} %{ARCH}’例如:得到输出: perl 5.8.8 x86_64 perl 5.8.8 i386
3、卸载掉冲突的 i386 包:
rpm -e perl.i386
YUM 操作报错:Error: rpmdb open failed
执行 yum 命令来安装程序时候,出现报错: Error: rpmdb open failed
示例输出:
该问题通常是由于 rpm 数据库被损坏所致。
可按照下述方法重建 yum 数据库:
1、cd /var/lib/rpm/。
2、执行 ls -l
查看数据库文件。如下图:
3、执行 rm -rf __db. 删除损坏的数据库(删除之前请做好备份)。
4、执行 rpm —rebuilddb 重建数据库。
5、最后执行 yum clean all 清理缓存等文件。
保存 YUM 安装软件时所下载的 rpm 包
在默认情况下 Linux 主机通过 yum 安装的软件,会在安装完成之后删除 rpm 包。如果需要保留相应 rpm 的依赖包,以防不时之需,可修改 yum 的配置文件来实现。
缓存路径默认位置是 /var/cache/yum,默认会根据系统版本和 yum 源的不同分别保存,也快根据用户实际需要自有修改。
修改保存之后。以 lrzsz 为例来下载测试:
1、执行命令 yum install lrzsz -y 进行软件安装。
2、查看 lrzsz 的安装包已经存放在 /var/cache/yum/base/packages 目录下了。
运维搬运工 , 版权所有丨如未注明 , 均为原创丨本网站采用协议进行授权 , 转载请注明!
不是路不平,而是你不行。到底行不行,看你停不停。只要你不停,早晚都能行。2016 Yum! Brands Annual Report
Please see our
Greg Creed,
Chief Executive Officer,
Yum! Brands, Inc.
Dear Fellow Stakeholders:
was truly a landmark year. On October 31st we completed the spin-off of the China business into a powerful, independent, publicly-traded company positioned for long-term growth. This marked the largest strategic initiative undertaken by Yum! since our spin-off from Pepsi 20 years ago. Yum China Holdings, Inc. (NYSE: YUMC) is now our largest franchisee and pays us a 3% license fee on system sales of our brands in mainland China. I’d like to recognize the work, effort and diligence across the organization that enabled us to complete the spin-off on time and with great success.
The China spin-off and return of $6.2 billion of capital to shareholders through dividends and share repurchases in 2016 concluded step one of Yum!’s transformation. Step two, which we announced in October 2016, includes executing a multi-year strategy to accelerate growth, further reduce volatility in our results and increase capital returns. This transformation will result in a company that is more focused, more franchised and more efficient, all of which will ultimately enable us to deliver more growth.
The lynchpin in our transformation is the power of more focus, which will enable us to deliver sustainable, long-term results. With this in mind we defined four growth capabilities outlined below. These are the key drivers of same-store sales growth and net-new unit growth, and will govern every decision and action we undertake.
Distinctive, relevant brands. We will innovate and elevate iconic restaurant brands people trust and champion.
Unmatched franchise operating capability. We will recruit and equip the best restaurant operators in the world to deliver great customer experiences.
Bold restaurant development. We will drive market and franchise unit expansion with strong economics and value.
Unrivaled culture & talent. We will leverage culture and people capability to fuel brand performance and franchisee success.
As we announced in October we are on a path to become more franchised, increasing our franchise mix to at least 98% by the end of 2018. This will increase our franchise fees significantly as a percentage of operating profit, producing a more stable and predictable cash flow stream. We intend to own no more than 2% of our restaurants with an “Own to Learn” mindset. Our leaders will completely dedicate themselves to our four growth capabilities.
Finally, we will run a more efficient business model, whereby we intend to limit G&A to 1.7% of system sales and reduce annual capital expenditures to about $100 million by the end of 2019. This will allow us to simultaneously maximize the potential of our brands and to aggressively grow our global footprint but in a productive manner. In combination, our more focused, more franchised and more efficient business model will enable us to deliver more growth and consistent shareholder returns.
With all of this change underway at Yum! I was pleased we delivered a strong year in 2016, highlights of which are below:
Worldwide system sales* grew 5%, excluding foreign currency translation. This was led by 7% growth at KFC, followed by 6% at Taco Bell and 2% at Pizza Hut.
GAAP operating profit increased 16%,
with growth across all three brands.
Net-new units grew 3%, with 2,316 total new openings.
We completed $6.9 billion of debt financing at very attractive rates, the proceeds of which were largely used to fund the shareholder returns mentioned above. We are now managing a capital structure which is levered in-line with our target of 5x EBITDA, and which we believe provides an attractive balance between optimized interest rates, duration and flexibility.
We declared our first quarterly dividend since we spun-off our China business and announced we would continue with a target payout ratio of roughly 45-50% of annual net income.
Each one of our three brands is committed to delivering on our key enterprise priorities and is working together on our journey towards building a world with more Yum! Ultimately this is driven by each brand’s individual True North, or positioning.
KFC with &Always Original& has returned to the basics with clear value at memorable price points and innovation close to the core. Just look at Nashville Hot, which started in the U.S. and is now rolling out in international markets. We did not change the form of our product – only the flavor profile, and our customers love it. Going forward KFC will continue this focus on the basics, coupled with a big push on the digital front and delivery.
Pizza Hut’s mantra of &Making it Easier to get a Better Pizza& is relevant for both our U.S. and International businesses, which are in distinctly different business circumstances today. Our U.S. business is in turnaround mode, with a focus on improving the digital experience, delivery times, point-of-sale simplification and asset optimization, to name a few. Our international business is laying the groundwork for prolonged growth with a focus on repeatable models to spread best practices around the world, and driving expansion through development agreements.
Taco Bell through &Live Más& succeeds with its value-driven, innovation-focused model. I’m pleased with the team’s ability to deliver solid results despite difficult industry conditions in 2016 and am energized by the high-low value strategy and innovative marketing calendar the team has put in place for 2017. On the international front Taco Bell continues to build momentum and we are thrilled with the enthusiasm the brand receives on a global basis.
In conclusion, while there is always more work to do, we are on the right path. We are taking the necessary steps to establish the foundation for sustainable, long-term growth that will translate to strong returns for our shareholders. We are committed to building the world’s most loved, trusted and fastest growing restaurant brands and I am confident this will result in value creation as we build on our momentum and move into
the future.
Greg Creed, CEO
*System sales include the impact of the 53rd week.
Financial Highlights
(In millions, except for per share amounts)Year-end
%B(W)change
Company Sales
Francise and license fees and income
Total Revenues
Operating Profit
Income from Continuing Operations
Reported Diluted Earnings Per Common Share from Continuing Operations
Special Items Earnings Per Common Share (a)
Diluted Earnings Per Common Share from Continuing Operations before Special Items (a)
Cash Flows Provided by Operating Activities from Continuing Operations
(a) See our 2016 Form 10-K for further discussion of Special Items.CentOS中yum命令的使用技巧_源码_站长之家ChinaZ.com
CentOS中yum命令的使用技巧
[摘要]本文介绍CentOS特有的命令yum使用方法技巧等,主要有提高yum速度、扩展rpm,通过yum工具下载rpm源码包等。
  做为一个RHCA(红帽认证架构师),当然有一些管理yum的小技巧。我原来以为别人都会,后来才发现只有自己知道。好东西当然要分享。 另外,我有一些对生产环境安装软件的朋友一些建议。多用rpm,deb之类的包管理安装,不要使用编译安装。原因有以下几点。
1、编译安装麻烦,浪费时间。
2、你以后可能都不记的编译的参数,你的下一任维护也麻烦。因为他不清楚你当时是用的什么参数编译。这个你的boss可关心着哦。
3、当然,有人一定会讲,编译性能高,其实不见的,出问题的机会也高哦,在讲一个程式性能提高3%有什么用。其实没有多少用。当然,你用LFS的系统做生产环境,那就有分别,因为你任何一个包都是自己编译的。相信你不会吧。
4、rpm -qf 可以查到那个文件是那个包,要是有一天,你的系统中有个文件坏了。你可以用rpm这个方法一下找出一,但你用编译安装,你就头痛了,天啊,这个包是那个软件生成的啊。
5、我不愿意从源程式安装。不是因为难。相反的,蛮容易。只是,我不愿意搞乱我的系统。如果我将从来源安装的程式更新,常常会发生的问题是还有一些档案没有被删除的干净。有时候这种情况会产生问题。如果要删除这个程式,你怎么保证所有被安装的档案都被删除?& 尽可能,我宁愿用 RPM 来安装。用 RPM 来更新和删除,RPM 做的很干净。
  好了,下面介绍重点:
技巧1:加快你的的速度。
  使用yum的扩展插件yum-fastestmirror,个人认为这个插件非常有效,速度真的是明显提高,
  注意,在Centos 4上,名字叫yum-plugin-fastestmirror
技巧2:扩展你的rpm包
  好多包官方没有,怎么搞定他。要我自己编译吗? 好了,你安装这个包,这个是redhat5的哦。这种有三个选择,可以多选。
1)使用 wieers 的源
  你可以自己到 http://dag.wieers.com/rpm/FAQ.php#B 这来找 # Red Hat Enterprise Linux 5 / i386:
  # Red Hat Enterprise Linux 5 / x86_64:
2)使用 RPEL 的源
  这个是RPEL为Fedora类RHEL系统的增强软件包源,也算半官方的源,项目的地址http://fedoraproject.org/wiki/EPEL/FAQ
3)使用 CentALT 的源
  这个是为 RHEL 做的增强的源,有最新的如 nginx,mysql 之类。
4)ATrpms 的源
  这个仓库提供了很多使用最新技术的应用程序和像myth-TV这样的多媒体工具,比如多媒体工具会有一些专利技术在,比如mp3/rmvb解码这样的内容,最开始开始主要是提供一些自然科学方面的软件,尤其是高能物理计算和数值计算工具这样的软件。在加入了很多其他软件以后,这个仓库已经不再是以前那么单一性质的软件仓库了。
  建议使用这个源的稳定stable版本的软件, 如果想试验最新技术,使用bleeding和testing时候自担风险.
查看: http://dl.atrpms.net/el5-i386/atrpms/
安装方法:
  首先导入PGP key&&&&&
  然后配置仓库文件,直接建立一个文件,放在/etc/yum.repos.d/目录下,可以命名成atrpms.repo,内容如下:
技巧3:rpm查找.
  还是有rpm包找不到怎么办,到下面这个网站。基本上都收集全了,你可以用高级查找看看. http://rpm.pbone.net/
技巧4:通过yum工具下载RPM源码包
  前提是有安装 yum-utils这个软件包.如果有安装的话
  当然,没有源包的话,还要加入一个源
技巧5:软件组安装
  有时我们安装完系统,管理有一类软件没有安装,比如用于开发的开发包,我们可以用软件组来安装,这是最建议使用的安装软件的方法。
  比如我们要安装开发有关的包
技巧6:查询文件和路径是哪个 rpm 包套件
  怎么样,上面的方法对你有用吗?
本文来自:
最流行的Web Server Apache发布了一个重大升级版,Apache HTTP Server 2.4的一个重要目标是大幅改进性能。...
热门源码下载推荐
最受关注报导
编辑推荐排行}

我要回帖

更多关于 yum provides 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信