yes i usually use that if as it takes a lot less space. The point of this is say for example you have to install the packages on multiple computers, using this command since they're downloaded you only have to run them.
yes i usually use that if as it takes a lot less space. The point of this is say for example you have to install the packages on multiple computers, using this command since they're downloaded you only have to run them.
Linux User #460341 || Ubuntu User #19510 || Unanswered Posts Team
Thats the beauty of linux, a million ways to do the same thing !
Thanks for this.
I've made the list, nice.
This is, of course, the plus side of things as I have a slow internet connection (128kbs), so it did take a while to get them (633.2 MB)
And combined, I now have a list I can use to look up a file, and the files on a CD.
Call that: 1,000,001 ways to do the same thing.
Thanks to both of you.
Have a nice day.
Bruce
i liked your method and i gave it a try, but ..
i exported the list of files, i edited it and added 1 application that i don't have installedand after thatCode:2vcard installit is supposed to have 2vcard installedCode:sudo dpkg --set-selections < installed-software
it does that automatically?? i tried sudo apt-get update && sudo apt-get upgrade but nothing happened
2vcard yet not installed
Όσο ζώ μαθαίνω ..."Computers are like air conditioners, when you open WINDOW$ they stop working."
Linus TorvaldsIf Microsoft ever does applications for Linux it means I've won.
You can't edit the file and add something like that. Just recreate the file, it takes a couple of seconds.
IMPORTANT: I just discovered that using this command:
Code:
dpkg --get-selections > installed-software
And if you wanted to use the list to reinstall this software on a fresh ubuntu setup,
Code:
dpkg --set-selections < installed-software
followed by
Code:
dselect
DOES NOT install packages not in repos. So if you have used this to backup packages it will be no good installing say a .deb package you downloaded from getdeb. Keep this in mind. Mine however, should work fine.
Thank you abhiroopb for the very informative tutorial!
I have one reservation about the method however, that I hope someone here will put to rest:
If you run
will it really install the debs in the correct order? I thought you would need a tool like apt-get to straighten out the dependency problems.Code:sudo dpkg -i *.deb
EDIT: Please ignore the rest of this message. I've tried it -- and it does not work. Setting up apt-get and sources.list properly is more complicated than what I showed below.
If that is true perhaps what we could do is
edit /etc/apt/sources.list by adding something like
(changing gutsy to hardy if that's the way you roll) then generate the list of packages withCode:deb file://home/user/dpkg-repack gutsy universe multiverse restricted main security gutsy-backports
(if you didn't have the list already) and install them withCode:% dpkg --get-selections | grep install | cut -f1 > installed-pkgs
Code:% sudo apt-get install `cat installed-pkgs`
Last edited by unutbu; June 12th, 2008 at 12:23 AM.
I haven't tested it exactly, but from what I've heard dpkg is able to do it automatically installing first the packages that need to be installed. What exactly is the difference? I'm sorry I'm a bit confused with what your solution does?
Here is a little experiment I ran to test if dpkg is smart enough to resolve dependencies on its own.
I've downloaded
warsow_0.42-1~getdeb1_i386.deb
warsow-data_0.42-1~getdeb1_all.deb
from http://www.getdeb.net/app.php?name=Warsow.
(This is a noble sacrifice in the name of science, mind you. I have no interest in warsow whatsoever except insofar as it shall help us explore the capabilities of dpkg. )
Code:% dpkg --info warsow_0.42-1~getdeb1_i386.deb <snip> Depends: libc6 (>= 2.6-1), libcurl3-gnutls (>= 7.16.2-1), libjpeg62, libkrb53 (>= 1.6.dfsg.1), libsdl1.2debian (>= 1.2.10-1), libvorbisfile3 (>= 1.2.0), libx11-6, libxext6, libxinerama1, libxxf86dga1, libxxf86vm1, zlib1g (>= 1:1.2.3.3.dfsg-1), mesa-utils, xbase-clients, warsow-data (= 0.42-1~getdeb1) <snip>
Notice warsow-data is one of the packages upon which warsow depends.
So what if I say
sudo dpkg -i warsow_0.42-1~getdeb1_i386.deb?
Will it install warsow-data first, or will it fail, complaining that warsow-data is not installed?
This shows that dpkg is not smart enough to resolve dependencies.Code:% sudo dpkg -i warsow_0.42-1~getdeb1_i386.deb Selecting previously deselected package warsow. (Reading database ... 169934 files and directories currently installed.) Unpacking warsow (from warsow_0.42-1~getdeb1_i386.deb) ... dpkg: dependency problems prevent configuration of warsow: warsow depends on warsow-data (= 0.42-1~getdeb1); however: Package warsow-data is not installed. dpkg: error processing warsow (--install): dependency problems - leaving unconfigured Errors were encountered while processing: warsow
I then tried to set up sources.list so that apt-get could work with a local directory filled with debs.
The reason why I tried to use apt-get to install the packages instead of dpkg is because I know apt-get is smart enough to resolve dependencies for me.
I've never done that before and I've just found out its a bit more complicated than I made it out to be in my previous post.
You need the right directory structure and a Package.gz file, a proper sources.list. I don't know how to do it... yet. Maybe a friendly neighborhood apt-wizard will be kind enough to show us the way...
Bookmarks