You are not logged in.

#1 2008-03-03 15:58:16

sH
Member
From: Braunschweig, Germany
Registered: 2007-05-02
Posts: 145

How to install multiple packages with pacman?

Hi ,

I guess it's a pretty noobish question but I wonder how to install multiple packages
that have the same prefix with Pacman.

To make myself more clear, I like to install all gstreamer packages and for that I would
like something similar to

pacman -S gstreamer10*

Is there a command that does something like this available? Found nothing in the man pages.
Maybe some tricky stuff with pipes?

Offline

#2 2008-03-03 16:24:56

ibendiben
Member
Registered: 2007-10-10
Posts: 519
Website

Re: How to install multiple packages with pacman?

What you could do is search for each package containing gstreamer10, next extract only those names starting with gstreamer10, next install the results:

pacman -S $(pacman -Ss gstreamer10 | sed 's#^\(gstreamer10[^ ]*\) .*$#\1#')

Hope that helps you wink

Offline

#3 2008-03-03 20:09:27

sH
Member
From: Braunschweig, Germany
Registered: 2007-05-02
Posts: 145

Re: How to install multiple packages with pacman?

Hi ibendiben,

thanks for your help, but I'm afraid, it does not work sad

[root@localhost ~]# pacman -S $(pacman -Ss gstreamer0.10 | sed 's#^\(gstreamer0.10[^ ]*\) .*$#\1#')
Warnung: gstreamer0.10-0.10.15-1 ist aktuell -- Überspringe
Fehler: '0.10.15-1': nicht in Sync-DB gefunden
[root@localhost ~]#

Offline

#4 2008-03-03 20:25:11

Purch
Member
From: Finland
Registered: 2006-02-23
Posts: 229

Re: How to install multiple packages with pacman?

pacman -S $(pacman -Ssq gstreamer0.10)

Last edited by Purch (2008-03-03 20:25:30)

Offline

#5 2008-03-03 20:26:30

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 955

Re: How to install multiple packages with pacman?

Since I want everyone to hav the texlive packages installed, I give you the following example:

pacman -S `pacman -Ss texlive |awk -F\/ '{print $2}'| awk '{print $1}'`

Offline

#6 2008-03-03 20:36:19

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 960
Website

Re: How to install multiple packages with pacman?

When you need only some stuff:

# pacman -S gstreamer0.10-{mad,mms,mpeg2dec,mpeg2enc,musepack}

I need real, proper pen and paper for this.

Offline

#7 2008-03-03 20:39:45

azleifel
Member
From: St Evenage, UK
Registered: 2007-10-28
Posts: 475

Re: How to install multiple packages with pacman?

There is a less interesting but nevertheless useful alternative for the specific gstreamer example, which is to use the package group:

pacman -S gstreamer0.10-plugins

(get a list of all package groups with pacman -Sgg).

Offline

#8 2008-03-03 22:50:40

ibendiben
Member
Registered: 2007-10-10
Posts: 519
Website

Re: How to install multiple packages with pacman?

sH wrote:

Hi ibendiben,
thanks for your help, but I'm afraid, it does not work sad

I'm so sorry, my fault, I couln't test it, and made some big mistakes.
This time it's working:

pacman -S $(pacman -Ss gstreamer0.10 | sed -n 's#^\([^/]*/gstreamer0.10[^ ]*\) .*$#\1#p')

smile

Offline

Board footer

Powered by FluxBB