1

How do you install Debian/Ubuntu packages from a file containing a list of package names?

I have a file packages.txt like:

apache2                       install
libapache2-mod-wsgi                       install
python-setuptools                       install
python-psycopg2                       install
python-numpy                       install
postgresql-plpython-9.1                       install
postgresql-client-common                       install
postgresql-client-9.1                       install
python-dev                       install
build-essential                       install
libtidy-0.99                       install
xvfb                       install
firefox                       install

And then I run:

sudo apt-get install dselect --yes
sudo dpkg --set-selections < "packages.txt"
sudo apt-get dselect-upgrade -y

But this doesn't seem to install everything. What am I doing wrong?

Cerin
  • 3,497
  • 17
  • 57
  • 72

1 Answers1

1

if you can paste the output of;

cut -f1 -d' ' packages.txt | xargs dpkg -l

that would help to show which packages didn't get installed. (that might run into an args count limit if you packages.txt is bonkers long, but try it and see)

then you can try to install (apt-get install somepackage) the packages that were missed to see any useful debugging information.

Tom
  • 10,886
  • 5
  • 39
  • 62
  • Yeah, libtidy-0.99 had its name changed to libtidy-0.99-0 in Ubuntu 12.04 (whereas I had previously been using 11.10), and that apparently prevented dpkg from installing the two packages after it. Not sure why I didn't get any error messages... – Cerin May 28 '12 at 02:58