You are not logged in.

#1 2017-04-24 15:19:06

TremorAcePV
Member
Registered: 2016-08-24
Posts: 22

How to see what package is causing a dependency via CLI?

I'm trying to install cacti. It's trying to install Wayland for some reason. This is in a Linux Container that never needs to have graphics. I've tried manually using the Arch Packages page to find which one requires Wayland, but I haven't had success. Finding which package requires Wayland when it's multiple dependencies down is seemingly difficult.

 [root@httpd nagios]# pacman -S cacti php-snmp net-snmp

Packages (42) boost-libs-1.63.0-1  cairo-1.14.8-1  damageproto-1.2.1-3  fixesproto-5.0+9+g4292ec1-1
              fontsproto-2.1.3-1  libdatrie-0.2.10-2  libdrm-2.4.79-1  libedit-20170329_3.1-1
              libevent-2.0.22-2  libfontenc-1.1.3-1  libglvnd-0.2.999+g4ba53457-2
              libomxil-bellagio-0.9.3-1  libpciaccess-0.13.5-1  libthai-0.1.26-1  libtxc_dxtn-1.0.1-6
              libxdamage-1.1.4-2  libxfixes-5.0.3-1  libxfont-1.5.2-1  libxft-2.3.2-1
              libxrender-0.9.10-1  libxshmfence-1.2-1  libxxf86vm-1.1.4-1  llvm-libs-3.9.1-2
              mariadb-10.1.22-1  mesa-17.0.4-1  net-snmp-5.7.3-3  pango-1.40.4-1  pixman-0.34.0-1
              renderproto-0.11.1-3  rrdtool-1.6.0-2  ttf-dejavu-2.37-1  wayland-1.13.0-1
              xf86vidmodeproto-2.3.1-3  xorg-bdftopcf-1.0.5-1  xorg-font-util-1.3.1-1
              xorg-font-utils-7.6-4  xorg-fonts-100dpi-1.0.3-3  xorg-fonts-alias-1.0.3-1
              xorg-fonts-encodings-1.0.4-4  xorg-mkfontdir-1.0.7-8  xorg-mkfontscale-1.1.2-1
              cacti-1.1.3-1

I'm following this guide: https://wiki.archlinux.org/index.php/cacti

See more info about what cacti is here: http://www.cacti.net

Why a web platform like this would need Wayland, I don't know. None of the three direct packages (i.e. cacti, php-snmp, and net-snmp) require Wayland, and I've checked a lot of their dependencies that I expected to require it, but I'm not sure which one it is (it's not xorg fonts AFAICT).

I essentially need to find a package dependency recursively. I've found ugly ways to do this, but I was wondering if there's a more elegant way.

Edit:

My problem is solved. I'm adding where this information exists in the Wiki for future reference by people who have this issue.

Here: https://wiki.archlinux.org/index.php/pacman

Tip: The pacman package contains other useful tools such as makepkg, pactree, vercmp, and checkupdates. Run pacman -Qlq pacman | grep bin to see the full list.

...

To list a dependency tree of a package:
$ pactree package_name

pactree lacks it's own Wiki page and isn't mentioned in the pacman manual.

Last edited by TremorAcePV (2017-04-24 17:02:20)

Offline

#2 2017-04-24 15:33:25

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How to see what package is causing a dependency via CLI?

Just install everything and then 'pacman -Qi wayland'. It's most probably some dependency of cacti that needs wayland, if I had to guess I'd say it's mesa.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2017-04-24 15:43:51

TremorAcePV
Member
Registered: 2016-08-24
Posts: 22

Re: How to see what package is causing a dependency via CLI?

R00KIE wrote:

Just install everything and then 'pacman -Qi wayland'. It's most probably some dependency of cacti that needs wayland, if I had to guess I'd say it's mesa.

That... seems messy? It works of course.

Hmm, seems the dependency chain is thus: Wayland < Mesa < libglvnd < cairo. Cacti needs cairo and libgl for vector graphics. Now I have to wonder if there's a way to provide libgl without any of the packages that have it.

Thanks. I had hoped there was some flag for pacman that would show me a dependency chain like the above. I'd figure this is something that comes up semi-regularly.

Offline

#4 2017-04-24 15:49:09

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,098

Re: How to see what package is causing a dependency via CLI?

pactree -s

Offline

#5 2017-04-24 15:50:45

TremorAcePV
Member
Registered: 2016-08-24
Posts: 22

Re: How to see what package is causing a dependency via CLI?

arojas wrote:

pactree -s

That is perfection. Thank you so much! big_smile

Offline

#6 2017-04-24 15:50:55

seth
Member
Registered: 2012-09-03
Posts: 51,046

Re: How to see what package is causing a dependency via CLI?

rrdtool, pango, cairo, libgl, mesa, wayland ...

edit: shit... again... ;-)

Last edited by seth (2017-04-24 15:52:00)

Offline

#7 2017-04-25 18:34:15

TheSgtBilko
Member
Registered: 2013-08-13
Posts: 87

Re: How to see what package is causing a dependency via CLI?

TremorAcePV wrote:
pactree lacks it's own Wiki page and isn't mentioned in the pacman manual.

Pacman manual? How about?

man pactree

Offline

Board footer

Powered by FluxBB