LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-06-2014, 01:52 AM   #1
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
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.

What am I overlooking?
 
Old 11-06-2014, 02:46 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi Klaatu,

apt assumes network contectivity, dpkg does not. So, have you tried using dpkg to remove problematic packages? Eg
Code:
dpkg --purge some-package
If you have packages only partially installed, Ie unpacked but not configured you can use:
Code:
dpkg --configure --pending
HTH,

Evo2.
 
1 members found this post helpful.
Old 11-06-2014, 12:08 PM   #3
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Original Poster
Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
OK, that makes sense. Thanks, I'll give it a shot this weekend and report back / mark this thread solved as applicable.
 
Old 11-08-2014, 07:03 AM   #4
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,463

Rep: Reputation: 299Reputation: 299Reputation: 299
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.

Last edited by jens; 11-08-2014 at 07:30 AM.
 
1 members found this post helpful.
Old 11-09-2014, 12:52 AM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I just tether my cell phone to get an internet connection when in a pinch.
 
Old 11-09-2014, 08:48 AM   #6
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Yabbut, if the equipment has no wifi capability, tethering can be rather difficult. Worse if it has no ethernet ports.
 
Old 11-09-2014, 02:20 PM   #7
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Original Poster
Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
Quote:
Originally Posted by jens View Post
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?
 
Old 11-09-2014, 03:04 PM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by sgosnell View Post
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
Code:
dhclient eth0
 
Old 11-09-2014, 03:39 PM   #9
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Original Poster
Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
Quote:
Originally Posted by EDDY1 View Post
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.
 
Old 11-09-2014, 04:53 PM   #10
andre@home
Member
 
Registered: Oct 2003
Distribution: 2x Debian 8.1 webdav servers
Posts: 93

Rep: Reputation: 44
Read this disccusion, usefull suggestions were made:
http://stackoverflow.com/questions/1...net-connection

There are more of such discussions running in the out side world.
https://www.google.nl/webhp?sourceid...ernet%20access

Last edited by andre@home; 11-09-2014 at 04:55 PM.
 
1 members found this post helpful.
Old 11-09-2014, 05:03 PM   #11
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Original Poster
Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
Quote:
Originally Posted by andre@home View Post
Read this disccusion, usefull suggestions were made:
http://stackoverflow.com/questions/1...net-connection

There are more of such discussions running in the out side world.
https://www.google.nl/webhp?sourceid...ernet%20access
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.
 
Old 11-09-2014, 07:36 PM   #12
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi Klaatu,
Quote:
Originally Posted by notKlaatu View Post
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 View Post
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 View Post
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 View Post
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 View Post
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.

HTH,

Evo2.
 
Old 11-09-2014, 08:09 PM   #13
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
Quote:
Originally Posted by evo2 View Post
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.

Last edited by k3lt01; 11-09-2014 at 08:11 PM.
 
Old 11-09-2014, 08:15 PM   #14
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by k3lt01 View Post
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.
True. I guess what I should have said was more along the lines of "access to a repository".

Cheers,

Evo2.
 
Old 11-09-2014, 09:21 PM   #15
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get has unmet dependencies, but apt-get -f install doesn't solve problem sophanox Linux - Software 1 02-23-2011 10:07 AM
unknown devices and cant access internet after apt-get update z4cque Linux - Networking 1 08-04-2007 06:41 PM
knoppix 3.4 and no apt-setup how to fix info install apt-file + base-config maximalred Debian 0 10-16-2004 06:36 PM
libxcurser-dev error on install, apt-get wont fix efi360 Linux - Software 0 03-01-2004 11:26 PM
rh9 xd2 apt apt-get problem fix and solution transeunt Red Hat 0 12-16-2003 10:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration