Tagged: yum Toggle Comment Threads | Keyboard Shortcuts

  • Jay Versluis 9:16 am on January 7, 2017 Permalink | Reply
    Tags: , yum   

    Categories: Linux ( 85 )

    How to fix duplicate packages in yum 

    From time to time, the yum package manager may encounter issues with duplicate packages that are erroneously installed on a system. This manifests in a yum update going awry, telling us something along the lines of this:

    yum update
    ...
    --> Finished Dependency Resolution
    Error: Package: ntp-4.2.6p5-22.el7.centos.2.x86_64 (@updates)
               Requires: ntpdate = 4.2.6p5-22.el7.centos.2
               Removing: ntpdate-4.2.6p5-22.el7.centos.2.x86_64 (@updates)
                   ntpdate = 4.2.6p5-22.el7.centos.2
               Updated By: ntpdate-4.2.6p5-25.el7.centos.x86_64 (base)
                   ntpdate = 4.2.6p5-25.el7.centos
     You could try using --skip-broken to work around the problem
    ** Found 41 pre-existing rpmdb problem(s), 'yum check' output follows:
    // huge scary list of packages follows
    

    You may at times install all other packages via yum update –skip-broken, but it will still leave some trouble on the system. Best to take care of it.

    Here’s how I’ve managed to do it on many occasions:
    (More …)





     
  • Jay Versluis 3:57 pm on February 23, 2015 Permalink | Reply
    Tags: , yum   

    Categories: Linux ( 85 )

    How to find which package provides a command in yum 

    CentOS-LogoSometimes you know you need a package, but when you try to install it with yum you’ll get a message like “No matches found”. Yet you’re sure the package exists because you’ve used it before.

    This can happen if the package in question is part of a set which installs multiple packages. The net-tools package springs to mind.

    yum has a great option called whatprovides with which you can query what package you need to install to use a command. Let’s try it out!

    Say I wanted to install mkfs.vfat which is not installed by default in CentOS. Simply trying to install it won’t work:

    yum install mkfs.vfat
    
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.advancedhosters.com
     * extras: centos.mirrors.tds.net
     * updates: centos.mirrors.tds.net
    No package mkfs.vfat available.
    Error: Nothing to do
    

    Of course it won’t. But I can ask yum what provides this package:

    yum whatprovides mkfs.vfat
    
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.advancedhosters.com
     * extras: ftp.usf.edu
     * updates: centos.mirrors.tds.net
    dosfstools-3.0.20-9.el7.x86_64 : Utilities for making and checking MS-DOS FAT
                                   : filesystems on Linux
    Repo        : base
    Matched from:
    Filename    : /usr/sbin/mkfs.vfat
    
    
    
    dosfstools-3.0.20-9.el7.x86_64 : Utilities for making and checking MS-DOS FAT
                                   : filesystems on Linux
    Repo        : @base
    Matched from:
    Filename    : /usr/sbin/mkfs.vfat
    

    Well fantastic! The package I’m looking for is called dosfstools. Knowing that, I can simply use yum install dosfstools, and a few moments later mkfs.vfat will work as expected.

    Thanks, yum!





     
  • Jay Versluis 1:54 pm on February 5, 2014 Permalink | Reply
    Tags: yum   

    Categories: Linux ( 85 )

    How to fix yum update failure blaming “qpid-cpp” 

    I’ve just tried to update one of my CentOS 6.2 servers that was built from an older AMI, only to find that the yum update command stopped unexpectedly with several dependency errors. They all pointed to something called “qpid”, and I must admit that I’ve never heard of it – nor did I know that it was installed.

    The long list ended with the following suggestion:

     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest
    

    And why not indeed, since yum is so nice to give us suggestions. I’ve tired running “yum update –skip-broken” and got the following message:

    Packages skipped because of dependency problems:
        qpid-cpp-client-0.14-22.el6_3.x86_64 from base
        qpid-cpp-client-ssl-0.14-22.el6_3.x86_64 from base
        qpid-cpp-server-0.14-22.el6_3.x86_64 from base
        qpid-cpp-server-ssl-0.14-22.el6_3.x86_64 from base
        qpid-qmf-0.14-14.el6_3.x86_64 from base
    

    Looks like this didn’t quite work either.

    Let’s see how to fix this





     
  • Jay Versluis 1:33 pm on November 17, 2013 Permalink | Reply
    Tags: , yum   

    Categories: Linux ( 85 )

    How to list installed packages on CentOS 

    yum can help us here. This should do the trick:

    #yum list installed
    

    If you’re interested in a particular package, you can pipe a search string into grep and only list filtered results:

    #yum list installed | grep "yum"
    
    keyutils-libs.i686    1.4-4.el6           @anaconda-CentOS-201303020136.i386/6.4
    yum.noarch            3.2.29-40.el6.centos
    yum-metadata-parser.i686
    yum-plugin-fastestmirror.noarch
    

    The search string doesn’t even need to be in quotes, and partials work fine too.





     
  • Jay Versluis 6:13 pm on July 27, 2013 Permalink | Reply
    Tags: yum   

    Categories: Linux ( 85 )

    How to use yum-complete-transaction 

    Tux-says-YUMEvery once in a while it can happen happen that use use “yum update” to update your Linux system.

    Usually this works without a hitch, but you may have come across a message such as this:

    Setting up Install Process
    Resolving Dependencies
    There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
    The program yum-complete-transaction is found in the yum-utils package.

    But what does this mean, and how do we alleviate this?

    (More …)





     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel