Results 11 to 15 of 15
A main feature of apt-get and yum is that they download the packages from some repository, yes. But another important feature of them is that they handle package dependencies internally ...
- 10-19-2011 #11Linux Guru
- Join Date
- May 2011
- Posts
- 1,813
A main feature of apt-get and yum is that they download the packages from some repository, yes. But another important feature of them is that they handle package dependencies internally for you. That is, if you want to install packageA that depends on packageB and packageC, then this would fail:
but this would workCode:rpm -ivh packageA.rpm
provided that packageB and packageC are also found in the system's available repos. All 3 packages would be installed in one go, this way.Code:yum install packageA
Last edited by atreyu; 10-19-2011 at 08:21 PM. Reason: added ".rpm" to be clear
- 10-20-2011 #12Just Joined!
- Join Date
- Apr 2011
- Posts
- 87
ok, I see it is only because of dependencies reasons and the order in which the dependencies are installed.
Curious though why do we need .deb or .rpm files couldn't we have just made yum download packages and dependencies in tar form?
Originally I thought the .deb and .rpm packages contained the package dependencies.
Is the .deb / .rpm files just like a tar (compressed file) that contains info that tells the dpkg/rpm program where to place the code (in what folder) and also lets you run a few install/configure scripts.
As well as check the integrate with the md5hashs of every file. Or is their something else that .deb or .rpm files have over regular tar (compressed binary folders/files)
Just wondering what the be deal is in using .deb or .rpm files over just a regular compressed file like tar , tar.gz , zip ,...etc
- 10-20-2011 #13Linux Guru
- Join Date
- May 2011
- Posts
- 1,813
Yes, you've pretty much summed up what dpkg and rpm do - they take a compressed file (cpio in the case of RPM, tar/gz in the case of dpkg) and decompress it to the proper location, run the pre/post scripts, maybe do other housekeeping (run ldconfig, restart a service), and update the database. Of course they do the file verification stuff (MD5 checking, etc.), too. Also, utilizing a package database as they do allows you to query your system for package-related info (what files belong to a package, when was it installed, what files have changed since installation, etc.), which is another benefit of using rpm/dpkg.
In short, you can't really replace an .rpm/.deb file with a tarball without completely replacing/rewriting your package installation mechanism (rpm/yum/dpkg/apt-get).
They packages cannot contain the dependencies themselves b/c you'd have a 1GB RPM for gnome-terminal, for example.
- 10-20-2011 #14Just Joined!
- Join Date
- Apr 2011
- Posts
- 87
Ok , should probably start another thread for package manager stuff.
But my last questions on the subject are is their away to apt-get or yum packages but to tell it to install on a different drive other then the drive you are issuing the apt-get command on?
I have looked and I found
So sudo apt-get download gccdownload - Download the binary package into the current directory
would download the .deb package for gcc but I am wondering if their is away to download all the dependency packages for gcc with download command?
After that I looked up dpkg and found the switch
Seems like you can change the install directory to anything you want with these options.Options:
--admindir=<directory> Use <directory> instead of /var/lib/dpkg.
--root=<directory> Install on a different root directory.
--instdir=<directory> Change installation dir without changing admin dir.
--path-exclude=<pattern> Do not install paths which match a shell pattern.
--path-include=<pattern> Re-include a pattern after a previous exclusion.
So I was thinking you could use apt-get to download the .deb and dependency .deb files then use dpkg --switches_above
to install on a different median such as a different HDD , thumb drive , cd/dvd ,...etc.
(without having to modify anything on the main HDD )
Wondering if that is even possible to do?
- 10-20-2011 #15Linux Guru
- Join Date
- May 2011
- Posts
- 1,813
I've never used to dpkg to do that so I can't speak from experience - maybe somebody else out there has? Why not just try it (on a hose-able system)?
I can tell you that you can do something similar in rpm with the --badreloc and --relocate options.


Reply With Quote
