Skip to main content

How do I find which package contains a certain file?

What to do if you need to install or build a package on Linux and it wants a missing file/library/etc...

Have you ever tried to install package or some vendor software, only to find that the install fails due to a missing library? Here is a collection of methods for finding the package that contains the missing file.

Red Hat Enterprise Linux/CentOS

Using yum

yum whatprovides /full/path/to/missing/filename
Note: In all of these processes, fill in the actual filename and path for which you are looking.

Using rpmfind site

  1. Browse to http://rpm.pbone.net/index.php3/stat/2/simple/2
  2. Enter filename or /full/path/to/missing/filename in the search box (start with just the filename)
  3. Check boxes of rpm-based distributions in which you want to search
  4. Click search

Debian/Ubuntu

apt-file

sudo aptitude install apt-file
sudo apt-file update
apt-file search filename
or
apt-file search /full/path/to/missing/filename

Using Debian's website

  1. Browse to http://www.debian.org/distrib/packages
  2. Scroll to the bottom to the section called "Search the contents of packages"
  3. Enter a single argument into the search field, either filename or /full/path/to/missing/filename
  4. Select your distribution
  5. Select the machine architecture for which you need the missing file
  6. Click "Search"

Comments

Popular posts from this blog

How to fix this ssh error from a Cisco switch: ssh_rsa_verify: RSA modulus too small: 512 < minimum 768 bits

Problem ssh user@cisco_switch returns: ssh_rsa_verify: RSA modulus too small: 512 < minimum 768 bits key_verify failed for server_host_key Solution The modulus of the ssh RSA key pair on the switch is too small. If you have access, generate a new key pair on the switch with a larger modulus. Procedure Login with ssh protocol version 1 ( ssh space dash one ): ssh -1 user@cisco_switch (On the switch): enable (On the switch): Authenticate to "Privileged Exec Mode" mode on the switch. (On the switch): conf t (On the switch): crypto key generate rsa general-keys modulus 1024 (On the switch): Press enter to accept that the current key pair for the switch will be replaced. You now should be able to log into the switch with ssh protocol version 2.

How do I dual-boot Ubuntu 18.04 on a 2011 Mac Mini?

Machine Specs: Mac Mini (Mid 2011), Macmini5,2 Core i7 16 GB RAM (2x8 GB) AMD Radeon HD 6630M 256MB 27-inch Apple Thunderbolt Display 512 GB SSD Running macOS 10.13 High Sierra Caution: This process can result in data loss. If you have personal data on the Mac Mini before starting, back it up first. Twice! (One is none. Two is one. ~ U.S. Navy Seal saying).  Also, mistyping in the parts of this process may brick your Mac Mini. You have been warned. If in doubt, stop working and do research on Google until you understand what's going on in the step. If you find an error, please leave a comment. I will update. Note: This is process I figured out in lieu of booting the Ubuntu install with EFI via refind. Via the refind boot method, I would constantly get: 10:39:07 kernel: Couldn't get size: 0x800000000000000e 10:39:07 kernel: MODSIGN: Couldn't get UEFI db list 10:39:07 kernel: Couldn't get size: 0x800000000000000e The error seems to be relate

PowerShell One-Liners

Introduction PowerShell is Microsoft's shell for their product lines. It's now on version 3.0. If you miss the power of the command line while using Windows on either your laptop or servers, PowerShell provides that power. Important concepts: Almost all aspects of the Microsoft ecosystem are objects within an overarching structure. You query and manipulate this structure and its objects with PowerShell. This includes all aspects of SharePoint, Active Directory, and Exchange. Other companies, like VMware (see below) have also written PowerShell modules. This "object nature" means that PowerShell pipes pass objects and properties, not just text.  Variables store data-structures of objects.  One-liners Note: Unwrap the code lines before you use them. Get Help Get the usage of the command "Select-Object": Get-Help Select-Object Built-in examples for the command "Select-Object": Get-Help Select-Object -exam