Linux find so dependencies

How To Find Dependencies For A Particular Package In CentOS

This tutorial explains how to find which package requires a certain dependency in CentOS, RHEL, Fedora and scientific Linux. You might ask why we need to find the dependencies. There could be many reasons. If you are a RPM package maintainer you need to be aware of the required dependencies for a particular package. Also, we can omit a particular package while installing multitude of X packages. Say for example, the other day I was trying to install root, a collection of packages provided by EPEL. The entire root-system is unfortunately split into a multitude of 40 packages. To install them, I just ran:

But the problem is out of the 40 packages, one particular package requires texlive as a dependency, and it consumed roughly 3 GB of disk space. So, I just want to find out which packages needs textalive as a dependency, so I can simply omit them to save up disk space. Now, you got the answer why we need to find out the dependencies for a particular package. Let us see how to do it with some simple examples.

Find dependencies for a particular package in RHEL, CentOS, Fedora

To find dependencies for any package, you can use the following command.

For example, to find the dependencies for sqlite, run:

Sample output:

As you see in the above output, sqllite requires many dependencies like glibc, libreadline, ncurses etc.

In case the above command doesn’t work by any chance, you can use repoquery command:

To use this command, you need to install yum-utils package.

Run the following command to install it.

Then, list out the dependencies for a package as shown below.

Example:

Sample output:

This command will work either the package is installed or not in your system.

If you want to know where a particular package comes from, just run:

Sample output:

As you see above, the sqlite package is from base repository.

Источник

How to Check Dependencies of a Package in Ubuntu/Debian-based Linux Distributions

Last updated October 29, 2020 By Abhishek Prakash 8 Comments

Installing applications via command line is quite easy in Ubuntu/Debian. All you need to do is to use apt install package_name.

But what if you want to know the dependencies of a package before or after installing it?

In this tutorial, I’ll show you various ways to see the dependencies of a package in Ubuntu and other Debian-based Linux distributions that use APT package management system.

Читайте также:  Где находится номер лицензии windows

What is package dependency in Ubuntu?

If you didn’t know already, when you install a software package in Linux, sometimes, it needs other packages to function properly. These additional packages are called dependencies. If these dependency packages are not installed on the system, it is usually installed automatically with the package.

For example, the GUI tool HandBrake for converting video formats needs FFmpeg, GStreamer. So for HandBrake, FFmpeg and GStreamer are the dependencies.

If you don’t have these packages installed on your system, they will be automatically installed when you install HandBrake on Ubuntu.

Check dependencies of a package in Ubuntu and Debian based distributions

As it often happens in Linux, there are more than one way to achieve the same result. Let’s see various ways to see the dependencies of a package.

Checking dependencies with apt show

You can use the apt show command to display details of a package. Part of this information is dependencies and you can see it in the line starting with Depends.

For example, here’s what it shows for ubuntu-restricted-extras package.

As you can see, ubuntu-restricted-extras package depends on ubuntu-restricted-addons package.

Here’s a catch! The dependency package may also depend on some other package and the chain could go on. Thankfully, the APT package manager handles this for you by automatically installing all the dependencies (most of the time).

What is recommended package?

Did you notice the line starting with Recommends in the above output?

Recommended packages are not direct dependencies for the package but they enable additional features.

As you can see, ubuntu-restricted-extras has ttf-mscorefonts-installer as recommended package for installing Microsoft Fonts on Ubuntu.

The recommended packages are also installed by default and if you explicitly want to forbid the installation of recommended package, use the –no-install-recommends flag like this:

sudo apt install –no-install-recommends package_name

Use apt-cache for getting just the dependencies information

The apt show has way too many information. If you want to get the dependencies in a script, the apt-cache command gives you a better and clean output.

The output looks much clean, does it not?

Check the dependencies of a DEB file using dpkg

Both apt and apt-cache command work on the packages that are available from the repositories. But if you download a DEB file, these command won’t work.

In this case, you can use the dpkg command with -I or –info option.

The dependencies can be seen in the line starting with Depends.

Checking dependencies and reverse dependencies with apt-rdepends

If you want more details on the dependencies, you can use the apt-rdepends tool. This tool creates the complete dependency tree. So, you get the dependency of a package and the dependencies of the dependencies as well.

It is not a regular apt command and you’ll have to install it from the universe repository:

Читайте также:  Php soap ��������� linux

The output is usually quite large depending on the dependency tree.

The apt-rdepends tool is quite versatile. It can also calculate the reverse dependencies. Which means, you can see what other packages depend on a certain package.

The output could be pretty big because it will print the reverse dependency tree.

I hope this quick tutorial was helpful in improving your command line knowledge a bit. Stay tuned for more such tips.

Like what you read? Please share it with others.

Источник

How To List The Dependencies Of A Package In Linux

The other day I was trying to figure out if there is any easy way to find or list the dependencies of a package in Linux. I have been using Linux as my primary OS for few years now, yet I don’t know how to find the dependencies for a certain package. Fortunately, I found a workaround after a few google searches and wanted to share it with our readers. So, here you go.

List The Dependencies Of A Package In Linux

On Arch Linux and derivatives such as Antergos and Manjaro Linux, Pacman provides an useful command called «Pactree». For those wondering, Pactree produces a dependency tree for a given package, say vim.

As you see in the above output, Pactree lists the dependencies of «vim» package in a nice tree-like format.

To know more details pactree command, refer the man pages.

For Fedora, Red Hat and its clones like CentOS, Scientific Linux, refer the following link.

On Debian, Ubuntu, and its derivatives like Linux Mint, Elementary OS, you can use apt-cache command to list the dependencies of a particular package.

To list what a package, say for example vim, depends on, run:

To list what depends on a package, say for example vim, run:

The above command displays the packages that depend on the vim package.

For more details, run:

On SUSE and openSUSE, you can list the dependencies of a given package using «zypper» command as shown below.

Источник

How do I find what dependencies a rpm file has?

RPM is a Package Manager for popular distribution such as Red Hat, Suse and many others. It is a powerful command line package management system for installing uninstalling, verifying, querying, and updating Linux computer software packages.

You can finding out what dependencies a rpm file has i.e. it will tell you what you need to install package with following command:
rpm -qpR <.rpm-file>
rpm -qR

Find out what dependencies a uninstalled rpm file called mediawiki-1.4rc1-4.i586.rpm:
# rpm -qpR mediawiki-1.4rc1-4.i586.rpm

It will print list of dependencies on screen (output):

However RPM has in build mechanism to tell you about dependencies. Just try to install package and it will give you list of dependencies.
# rpm -ivh mediawiki-1.4rc1-4.i586.rpm

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:
    • How to set up Redis sentinel cluster on Ubuntu or Debian Linux
    • How To Set Up SSH Keys With YubiKey as two-factor authentication (U2F/FIDO2)
    • How to set up Mariadb Galera cluster on Ubuntu or Debian Linux
    • A podman tutorial for beginners – part I (run Linux containers without Docker and in daemonless mode)
    • How to protect Linux against rogue USB devices using USBGuard
Читайте также:  Provideoplayer аналог для windows

Join Patreon

  • .rpm file: File with .RPM extension. Typically this file is not installed. It may be on CD or you just downloaded from Internet.
  • package-name: It is installed RPM file.

You can solve dependencies problem by installing each individual package(s). If you are using Red hat Linux then you can try this tip. If you are using Fedora core Linux then try yum. If you are using Suse linux then use Yast to install rpms.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via

Category List of Unix and Linux commands
Documentation help • mandb • man • pinfo
Disk space analyzers df • duf • ncdu • pydf
File Management cat • cp • less • mkdir • more • tree
Firewall Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04
Linux Desktop Apps Skype • Spotify • VLC 3
Modern utilities bat • exa
Network Utilities NetHogs • dig • host • ip • nmap
OpenVPN CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04
Package Manager apk • apt
Processes Management bg • chroot • cron • disown • fg • glances • gtop • jobs • killall • kill • pidof • pstree • pwdx • time • vtop
Searching ag • grep • whereis • which
Shell builtins compgen • echo • printf
Text processing cut • rev
User Information groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w
WireGuard VPN Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04

Comments on this entry are closed.

First thanks for help ,i can’t install Python 2.3.4-2.aix5.1.ppc.rpm without error dependencies libcrypto.a,libgdbm.a,libssl.a ;
any experiences in installing “AIX rpms” for this inconvenient? with –nodeps .

I am not able to figure out what is going wrong here…can you guys..have a look..and give me feedback why these packages are not getting installed…

I want…to install
elfutils-libelf-devel-0.137-3.el5.i386.rpm
elfutils-libelf-devel-static-0.137-3.el5.i386.rpm

[root@applications Server]# rpm -Uvh elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
error: Failed dependencies:
elfutils-libelf-devel-i386 = 0.137-3.el5 is needed by elfutils-libelf-devel-static-0.137-3.el5.i386
[root@applications Server]# rpm -Uvh elfutils-libelf-devel-0.137-3.el5.i386.rpm
error: Failed dependencies:
elfutils-libelf-devel-static-i386 = 0.137-3.el5 is needed by elfutils-libelf-devel-0.137-3.el5.i386
[root@applications Server]# rpm -qpR elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
elfutils-libelf-devel-i386 = 0.137-3.el5
rpmlib(CompressedFileNames) Raj Feb 23, 2015 @ 8:16

hi ..
I am trying to install oracle developer 6i on Linux 5 it’s my first time, found problem to install rpm ,
had enough try with nothing , pls, could help me by steps i really need it.
God bless all

Источник

Оцените статью