[SOLVED] Fix APT with `apt-get -f install` without internet access?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Fix APT with `apt-get -f install` without internet access?
I am maintaining computers at a site with no internet.
To install new applications, I used Synaptic > File > Generate Script, which gave me a list of dependencies; I downloaded those, put them on a drive, took them to the site.
I tried to install the packages with just a
Code:
dpkg -i *deb
...thinking that since they were binary installs, dpkg would install regardless of dependency resolution; that didn't happen, and it seems to have screwed things up badly enough that I cannot install anything.
It says I need to do a
Code:
apt-get -f install
to repair, but when I do this, it complains that it cannot fetch packages.
So I do
Code:
apt-get -f purge
but it complains that it cannot fetch packages.
I'm assuming there's some way that I'm just not seeing to clear out whatever packages are clogging up this system without actually having access to the internet. I'm just not getting what it is. The man page suggests a few things, but so far everything seems to want to have internet access, even though all I'm trying to do is remove packages.
Instead of --pending, you can also use -a (--all):
Code:
dpkg --configure -a
... both should end up doing the same (--configure avoids packages that are marked as successfully configured).
Use dpkg-reconfigure to (re)configure "already configured" packages.
Code:
dpkg-reconfigure -a
... will reconfigure all packages.
The dpkg commands suggested in this thread were successful. Sometimes it took one or the other, or both, sometimes manual one-by-one uninstalls of certain packages were required, but it all worked out in the end.
It seems to me that dpkg should not really be concerned with deps if I am installing a binary .deb package. Copy the files to the system, warn me that deps have not been satisfied, and let me install the separately. To put the APT database into an unusable state just because a few packages are missing dependencies (which I intended to manually satisfy) seems like a bad policy to me.
Is there a better way to do offline manual installs of deb packages, aside from dpkg?
Or am I just trying to treat this too much like Slackware, and need to just get into the rhythm of how Debian does things? It's ok if that is the case, but I guess my ideal solution would be something that just lets me install deb packages (which I have pre-downloaded, deps inclusive) without regard to deps, trusting that I know enough to install the deps.
tldr:
Is there a way to install binary packages on Debian out of the sequence defined by their hierarchy of dependencies?
Yabbut, if the equipment has no wifi capability, tethering can be rather difficult. Worse if it has no ethernet ports.
Tethering with phone is done by usb connection but treated as ethernet. Most phones today just have to be enabled in the phone settings. As far as the connection it's established upon boot, if not just enter
Tethering with phone is done by usb connection but treated as ethernet. Most phones today just have to be enabled in the phone settings. As far as the connection it's established upon boot, if not just enter
Code:
dhclient eth0
Tethering with a phone is not an option, as I have no cell phone.
Thanks. I get the picture I think. build-deps sounds like the missing piece of the puzzle, although I still think it's a bit clunky since apparently it will require removal of pre-existing deps. I will figure out the best combo and script something that makes it more or less simple.
Thanks everyone for the suggestions. Marking this thread as solved.
It seems to me that dpkg should not really be concerned with deps if I am installing a binary .deb package. Copy the files to the system, warn me that deps have not been satisfied, and let me install the separately. To put the APT database into an unusable state just because a few packages are missing dependencies (which I intended to manually satisfy) seems like a bad policy to me.
Debian works very hard to try to ensure there are no broken dependencies. If you really want to you can force it to break the dependencies by using the command line options to dpkg, but if you are resorting to this you've probably missed something or made a "mistake" in your approach to solving the problem.
Quote:
Originally Posted by notKlaatu
Is there a better way to do offline manual installs of deb packages, aside from dpkg?
If you have all the required packages you can install them in one go with dpkg.
Code:
dpkg -i *.deb
If this is something you will need to do on a regular basis then I suggest you look into using something like apt-offline.
Quote:
Originally Posted by notKlaatu
Or am I just trying to treat this too much like Slackware, and need to just get into the rhythm of how Debian does things?
I think this may be the case.
Quote:
Originally Posted by notKlaatu
It's ok if that is the case, but I guess my ideal solution would be something that just lets me install deb packages (which I have pre-downloaded, deps inclusive) without regard to deps, trusting that I know enough to install the deps.
See above.
Quote:
Originally Posted by notKlaatu
tldr:
Is there a way to install binary packages on Debian out of the sequence defined by their hierarchy of dependencies?
Short answer: Yes, there is (flags given in dpkg man page), but no, you probably shouldn't do it.
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Rep:
Quote:
Originally Posted by evo2
apt assumes network contectivity, dpkg does not.
apt does not require network connectivity for it to work, you can use CD/DVD media or even a portable (flash/Hard) drive with a repository on it.
Once you have that all sorted you just place it in the sources.list and you're done.
If the machines are off line, have they been upgraded at all?
If the machines haven't been upgraded are you putting new packages or are they from the old repo's
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.