redhat 第三方yum源之libva安装

本文转载自:点击打开链接

来自余洪春老师《构建高可用linux服务器》

 

简单记录一下,加强记忆

 

安装epel源的好处就是epel这个项目是由fedora维护的,在维护的这个源中包含许多软件,包括ntop,nagios之类的,也就是说,你安装了epel源就可以直接用yum install ntop来安装了,贼方便

 

不过这个应该针对红帽企业版Linux(RHEL)及其衍生发行版(比如CentOS、Scientific Linux)系统,ubuntu这类的应该不行。

 

而且安装epel很简单,步骤如下:

 

1、查看epel简介:https://fedoraproject.org/wiki/EPEL/zh-cn ,看它的主要目的是里面有rpm包的下载地址;

 

2、下载epel的rpm包:wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

这个地址经常变动,并且注意你的linux os release版本,选择相应的进行下载安装;

 

3、安装epel:rpm -ivh epel-release-5-4.noarch.rpm

 

4、导入key,这一步可以自己手动,也可以不做,在你用了epel的源下载了某个软件之后,yum会提示你,有一个更快更好的源,它的key要不要导入进去,选择yes就可以了。你手动导入的话也可以,执行rpm -import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL

 

5、设置epel源的优先级,很多人可能会担心装了epel是不是会损坏之前的官方源,epel确实很强大,epel安装完之后只是在/etc/yum.repos.d/生成了两个文件,一个是epel.repo,一个是epel-testing.repo,不会替换掉原本的Centos0-Base-repo,所以不必担心。

修改epel.repo文件,在[epel-debuginfo]的上一行添加“priority=11 ”,这样的话,yum先去官方源查找,官方源没有再去epel的源找

整个epel.repo文件如下

写道
[epel]
name=Extra Packages for Enterprise Linux 5 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
priority=11
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 5 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 5 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL
gpgcheck=1

--------割割------------

-------以下为本人安装libva库的测试------

先查找libva的包:

[root@localhost yum.repos.d]# yum search libva
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
epel/x86_64/metalink                                                                                                                  | 7.0 kB  00:00:00     
epel                                                                                                                                  | 4.7 kB  00:00:00     
epel/x86_64/updateinfo         FAILED                                          
https://mirrors.ustc.edu.cn/fedora/epel/7/x86_64/repodata/73ce8294c1118f0cb90abd081bfb737552ee5d7ac1bcb93d13941f766b2747ef-updateinfo.xml.bz2: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article 


https://access.redhat.com/articles/1320623


If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/


epel/x86_64/primary_db         FAILED                                                                                      ]  0.0 B/s |    0 B  --:--:-- ETA 
https://mirrors.tongji.edu.cn/epel/7/x86_64/repodata/da4d0ce3e657bda89ab70c7c225b8739ade331925b41f6d132d950eb7560446a-primary.sqlite.bz2: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
(1/3): epel/x86_64/group_gz                                                                                                           | 266 kB  00:00:00     
epel/x86_64/updateinfo         FAILED                                          
http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/7/x86_64/repodata/73ce8294c1118f0cb90abd081bfb737552ee5d7ac1bcb93d13941f766b2747ef-updateinfo.xml.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
epel/x86_64/primary_db         FAILED                                          
http://ftp.riken.jp/Linux/fedora/epel/7/x86_64/repodata/da4d0ce3e657bda89ab70c7c225b8739ade331925b41f6d132d950eb7560446a-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
epel/x86_64/primary_db         FAILED                                                                                      ] 407 kB/s | 986 kB  00:00:16 ETA 
http://mirror2.totbb.net/epel/7/x86_64/repodata/da4d0ce3e657bda89ab70c7c225b8739ade331925b41f6d132d950eb7560446a-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
(2/3): epel/x86_64/updateinfo                                                                                                         | 919 kB  00:00:00     
(3/3): epel/x86_64/primary_db                                                                                                         | 6.4 MB  00:00:35     
Loading mirror speeds from cached hostfile
 * base: centos.ustc.edu.cn
 * epel: mirrors.ustc.edu.cn
 * extras: centos.ustc.edu.cn
 * updates: centos.ustc.edu.cn
==================================================================== N/S matched: libva =====================================================================
libva-devel.x86_64 : Development files for libva
libva.x86_64 : Video Acceleration (VA) API for Linux
libva-intel-hybrid-driver.x86_64 : VA driver for Intel G45 & HD Graphics family
libva-utils.x86_64 : Tools for VAAPI (including vainfo)
libva-vdpau-driver.x86_64 : HW video decode support for VDPAU platforms
vanessa_socket-pipe.x86_64 : Trivial TCP/IP pipe build using libvanessa_adt


  Name and summary matches only, use "search all" for everything.

再安装

[root@localhost yum.repos.d]# yum libva.x86_64
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
No such command: libva.x86_64. Please use /bin/yum --help
[root@localhost yum.repos.d]# yum install libva.x86_64
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
 * base: centos.ustc.edu.cn
 * epel: mirrors.ustc.edu.cn
 * extras: centos.ustc.edu.cn
 * updates: centos.ustc.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package libva.x86_64 0:1.8.3-0.1.el7 will be installed
--> Finished Dependency Resolution


Dependencies Resolved


=============================================================================================================================================================
 Package                            Arch                                Version                                      Repository                         Size
=============================================================================================================================================================
Installing:
 libva                              x86_64                              1.8.3-0.1.el7                                epel                               80 k


Transaction Summary
=============================================================================================================================================================
Install  1 Package


Total download size: 80 k
Installed size: 209 k
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/$releasever/epel/packages/libva-1.8.3-0.1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY --:--:-- ETA 
Public key for libva-1.8.3-0.1.el7.x86_64.rpm is not installed
libva-1.8.3-0.1.el7.x86_64.rpm                                                                                                        |  80 kB  00:00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) <epel@fedoraproject.org>"
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-11.noarch (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
PackageKit-1.1.5-1.el7.x86_64 has missing requires of PackageKit-backend
  Installing : libva-1.8.3-0.1.el7.x86_64                                                                                                                1/1 
  Verifying  : libva-1.8.3-0.1.el7.x86_64                                                                                                                1/1 


Installed:
  libva.x86_64 0:1.8.3-0.1.el7                                                                                                                               


Complete!

至此libva库安装成功结束。

再次感谢原博主的分享!~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值