Tag Archives: yum

Yum install rpm files manually

I love yum on CentOS/Red Hat/Fedora. It saves so much of my time installing software on servers. Sometimes, the need comes when I cannot find the package inside the usual “safe” repositories, such as RHEL repos and RPMForge. So I search it and find it on pbone, rpmfind, or epel packages. I have always tried installing with rpm, but often end up with dependencies problems.

Example:

# rpm -Uvh icecast-2.3.2-4.el5.x86_64.rpm 
warning: icecast-2.3.2-4.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6
error: Failed dependencies:
        libogg.so.0()(64bit) is needed by icecast-2.3.2-4.el5.x86_64
        libspeex.so.1()(64bit) is needed by icecast-2.3.2-4.el5.x86_64
        libtheora.so.0()(64bit) is needed by icecast-2.3.2-4.el5.x86_64
        libtheora.so.0(libtheora.so.1.0)(64bit) is needed by icecast-2.3.2-4.el5.x86_64
        libvorbis.so.0()(64bit) is needed by icecast-2.3.2-4.el5.x86_64

Then I would have to go hunt down each of those dependencies. Too much time wasted. If only you could use yum to resolve those “resolvable” dependencies (using rpmforge/rhel repositories). Well you can:

# yum localinstall icecast-2.3.2-4.el5.x86_64.rpm
    However, there are two caveats:

  1. Sometimes yum can’t find the dependencies, so you must search those out. (obvious)
  2. You probably haven’t imported the gpgcheck for the rpm package that you are trying to download.
    Example:

    warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6
    Public key for icecast-2.3.2-4.el5.x86_64.rpm is not installed

    So you can either import it, or you can ignore the gpg check by doing this

    # yum --nogpgcheck localinstall icecast-2.3.2-4.el5.x86_64.rpm

Yum update stops resolving dependencies for clamav-server

On my CentOS/VirtualMin server configured for RPMForge, I wanted to run yum update, but I was getting the following errors while resolving dependencies for the clam* packages (you can list them by typing: rpm -qa | grep clam.

clamav-server-sysv-0.96-1.vm.el5.i386 from installed has depsolving problems
--> Missing Dependency: clamav-server = 0.96-1.vm.el5 is needed by package clamav-server-sysv-0.96-1.vm.el5.i386 (installed)
Error: Missing Dependency: clamav-server = 0.96-1.vm.el5 is needed by package clamav-server-sysv-0.96-1.vm.el5.i386 (installed)

I’ve had this problem on other servers where I had simply ignored it. But it was getting too much. So I researched and found the following solution working perfectly.

Solution

  1. Remove the clam rpms without removing the dependencies (virtualmin-base) by typing: rpm --nodeps -e clamav-0.96-1.vm.el5 and rpm --nodeps -e clamav-server-sysv-0.96-1.vm.el5.
  2. Run yum update

And voila, I get the following:

Dependencies Resolved

=====================================================================================================================================================================================================
 Package                                                  Arch                                    Version                                            Repository                                 Size
=====================================================================================================================================================================================================
Installing:
 clamav                                                   i386                                    0.96.4-1.el5.rf                                    rpmforge                                  2.2 M
     replacing  clamav-lib.i386 0.96-1.vm.el5

 clamav-db                                                i386                                    0.96.4-1.el5.rf                                    rpmforge                                   25 M
     replacing  clamav-update.i386 0.96-1.vm.el5

 clamd                                                    i386                                    0.96.4-1.el5.rf                                    rpmforge                                  233 k
     replacing  clamav-server.i386 0.96-1.vm.el5

Another solution: I have had servers that had conflicts even on the yum update, because maybe dependent packages came from conflicting repos. Specifically, clamav dependencies of rpmforge conflicted with clamav dependencies of virtualmin. To solve this, I ran: yum --disablerepo=* --enablerepo=virtualmin install clamav clamav-filesystem clamav-data clamav-lib

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package clamav.x86_64 0:0.96.5-1.vm.el5 set to be updated
---> Package clamav-data.x86_64 0:0.96.5-1.vm.el5 set to be updated
---> Package clamav-filesystem.x86_64 0:0.96.5-1.vm.el5 set to be updated
---> Package clamav-lib.x86_64 0:0.96.5-1.vm.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================
 Package                               Arch                       Version                             Repository                      Size
===========================================================================================================================================
Installing:
 clamav                                x86_64                     0.96.5-1.vm.el5                     virtualmin                     934 k
 clamav-data                           x86_64                     0.96.5-1.vm.el5                     virtualmin                      25 M
 clamav-filesystem                     x86_64                     0.96.5-1.vm.el5                     virtualmin                      18 k
 clamav-lib                            x86_64                     0.96.5-1.vm.el5                     virtualmin                     4.4 M

Transaction Summary
===========================================================================================================================================
Install       4 Package(s)
Upgrade       0 Package(s)

Total download size: 31 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): clamav-filesystem-0.96.5-1.vm.el5.x86_64.rpm                                                                 |  18 kB     00:00     
(2/4): clamav-0.96.5-1.vm.el5.x86_64.rpm             (0%) 17% [=======                                   ]  0.0 B/s | 160 kB     --:-- ETA 
(3/4): clamav-lib-0.96.5-1.vm.el5.x86_64.rpm         (3%)  3% [=-                                        ]  0.0 B/s | 168 kB     --:-- ETA 
(4/4): clamav-data-0.96.5-1.vm.el5.x86_64.rpm       (17%)  0% [                                          ]  0.0 B/s |  40 kB     --:-- ETA 
-------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                      914 kB/s |  31 MB     00:34     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : clamav-filesystem                                                                                                   1/4 
  Installing     : clamav-data                                                                                                         2/4 
  Installing     : clamav-lib                                                                                                          3/4 
  Installing     : clamav                                                                                                              4/4 

Installed:
  clamav.x86_64 0:0.96.5-1.vm.el5            clamav-data.x86_64 0:0.96.5-1.vm.el5        clamav-filesystem.x86_64 0:0.96.5-1.vm.el5       
  clamav-lib.x86_64 0:0.96.5-1.vm.el5 

Along with the above solution, you must remember to disable the conflicting repository. In this case, rpmforge. If rpmforge ever has a newer version of one of the clamav packages, and anyone runs yum update, the dependencies will again stop resolving (because rpmforge and virtualmin repositories do not have a symbiotic relationship). To disable rpmforge, edit /etc/yum.repos.d/rpmforge.repo and add/replace enabled=0 to the [rpmforge] section. Also note, that anytime you want to explicitly use rpmforge, you can do yum --disablerepo=* --enablerepo=rpmforge (or if you want to use it in conjunction with other enabled repositories, remove the –disablerepo flag).