Well, it doesn’t happen very often, but I actually found a pretty nice feature in yum, the thing they call a package manager in rpm based distros. I noticed by accident, and was pleasantly surprised. AFAIK, apt-get doesn’t let you do that..

A quick demo 😉

# yum install /usr/lib/libstdc++.so.6
Loading “installonlyn” plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Importing additional filelist information
Resolving Dependencies
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for libstdc++ to pack into transaction set.
libstdc++-4.1.2-14.el5.i3 100% |=========================| 54 kB 00:00
—> Package libstdc++.i386 0:4.1.2-14.el5 set to be updated
–> Running transaction check

Dependencies Resolved

Package Arch Version Repository Size
libstdc++ i386 4.1.2-14.el5 base 354 k

Transaction Summary
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 354 k
Is this ok [y/N]: