LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-14-2011, 01:44 AM   #1
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,373

Rep: Reputation: Disabled
apt-offline


I found out today that there is a program called apt-offline, which has something to do with downloading packages for an offline computer...I think. I didn't understand the description very well. Can anyone explain this to me?

Quote:
apt-offline can fully update and upgrade an APT based distribution without
connecting to the network, all of it transparent to apt

apt-offline can be used to generate a signature on a machine (with no network).
This signature contains all download information required for the apt database
system. This signature file can be used on another machine connected to the
internet (which need not be a Debian box and can even be running windows) to
download the updates.
The downloaded data will contain all updates in a format understood by apt and
this data can be used by apt-offline to update the non-networked machine.

apt-offline can also fetch bug reports and make them available offline
Updating a non-networked computer? I don't understand how that would work. So you do...something involving a signature file...with another computer that is connected to a network. How is the networked computer supposed to communicate with the non-networked one to update it? Through means other than a network connection? If that's the case, who needs apt-ofline? Transferring information manually is what flash drives and CDs are for.

If I understood how this program works, perhaps I could use it to download packages on a Linux installation where (oops) I made a software change that disrupted my internet connection (so obviously I can't fix it by downloading and reinstalling the old software). Or...perhaps not. I just realized the description specifies "upgrade," which might mean it can only update packages I have already installed.

Last edited by newbiesforever; 08-14-2011 at 01:53 AM.
 
Old 08-14-2011, 06:52 AM   #2
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbangified Debian 8 (Jessie)
Posts: 747
Blog Entries: 1

Rep: Reputation: 172Reputation: 172
Depending on which distro you're using, you can download the required packages directly from the repository.
http://www.debian.org/distrib/packages
But keep in mind that you must have all the dependencies. So, for any giving package, you need to make a list of the dependencies (including version numbers) and compare them with what is already installed. Remember that packages that are dependencies of the package you want may have their own dependencies. But work one layer at a time and you can do it.

Once you have Internet access back, you can go back to working the normal way!
 
Old 08-14-2011, 07:08 AM   #3
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbangified Debian 8 (Jessie)
Posts: 747
Blog Entries: 1

Rep: Reputation: 172Reputation: 172
P.S: I just did a quick test and you can use apt-offline to install new software!
http://batmat.net/apt-offline/ch3.html
 
Old 08-14-2011, 11:49 AM   #4
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,373

Original Poster
Rep: Reputation: Disabled
And is this useful only for upgrading? It sounds that way, from the context of the instructions.
 
Old 08-14-2011, 03:39 PM   #5
qlue
Member
 
Registered: Aug 2009
Location: Umzinto, South Africa
Distribution: Crunchbangified Debian 8 (Jessie)
Posts: 747
Blog Entries: 1

Rep: Reputation: 172Reputation: 172
Quote:
Originally Posted by newbiesforever View Post
And is this useful only for upgrading? It sounds that way, from the context of the instructions.
The link in my second response is a tutorial.
in the following example I'll demonstrate hoe to install firefox:
(this part is on the machine that you want to install to)
Code:
qlue@qlue:~$ sudo apt-get install firefox-sage 
[sudo] password for qlue: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  iceweasel libmozjs2d xul-ext-sage xulrunner-1.9.1
Suggested packages:
  xfonts-mathml ttf-mathematica4.1 xprint mozplugger libcanberra0
The following NEW packages will be installed:
  firefox-sage iceweasel libmozjs2d xul-ext-sage xulrunner-1.9.1
0 upgraded, 5 newly installed, 0 to remove and 6 not upgraded.
Need to get 9,026 kB of archives.
After this operation, 25.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
qlue@qlue:~$
Code:
qlue@qlue:~$ sudo apt-get -qq --print-uris install firefox-sage > uris
qlue@qlue:~$
Code:
qlue@qlue:~$ awk '{print "wget -O " $2 " " $1}' < uris > /media/WINE/wget.sh
qlue@qlue:~$
note: /media/WINE/ is a flash drive that I have ownership permissions for.

Now, navigate to the flash drive, right-click on the file wget.sh and select properties>permissions. set 'allow this file to run as a program'
Then, take this to another Linux machine that has Internet access and run the script. Wait for it to finish. (click or double click on the file from the file manager. on Ubuntu you will get a dialogue with options, 'select run this file') N.B: the tutorial also explains how to do this from Windows, but the whole technique is different and more complicated)

Now put the flash drive back to your non-networked computer. (note: apt-offline must be installed there)

Code:
qlue@qlue:~$ sudo apt-get -o dir::cache::archives="/media/WINE" install firefox-sage
[sudo] password for qlue: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  iceweasel libmozjs2d xul-ext-sage xulrunner-1.9.1
Suggested packages:
  xfonts-mathml ttf-mathematica4.1 xprint mozplugger libcanberra0
The following NEW packages will be installed:
  firefox-sage iceweasel libmozjs2d xul-ext-sage xulrunner-1.9.1
0 upgraded, 5 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B/9,026 kB of archives.
After this operation, 25.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously deselected package xul-ext-sage.
(Reading database ... 101508 files and directories currently installed.)
Unpacking xul-ext-sage (from .../xul-ext-sage_1.4.3-5_all.deb) ...
Selecting previously deselected package firefox-sage.
Unpacking firefox-sage (from .../firefox-sage_1.4.3-5_all.deb) ...
Selecting previously deselected package libmozjs2d.
Unpacking libmozjs2d (from .../libmozjs2d_1.9.1.16-8_i386.deb) ...
Selecting previously deselected package xulrunner-1.9.1.
Unpacking xulrunner-1.9.1 (from .../xulrunner-1.9.1_1.9.1.16-8_i386.deb) ...
Selecting previously deselected package iceweasel.
Unpacking iceweasel (from .../iceweasel_3.5.16-8_i386.deb) ...
Adding 'diversion of /usr/bin/firefox to /usr/bin/firefox.real by iceweasel'
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for menu ...
Processing triggers for hicolor-icon-theme ...
Setting up xul-ext-sage (1.4.3-5) ...
Setting up firefox-sage (1.4.3-5) ...
Setting up libmozjs2d (1.9.1.16-8) ...
Setting up xulrunner-1.9.1 (1.9.1.16-8) ...
update-alternatives: using /usr/lib/xulrunner-1.9.1/xulrunner-stub to provide /usr/bin/xulrunner-stub (xulrunner-stub) in auto mode.
Setting up iceweasel (3.5.16-8) ...
update-alternatives: using /usr/bin/iceweasel to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode.
Processing triggers for menu ...
N: Ignoring file 'opera.list.save' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
qlue@qlue:~$
This is a simple example of installing Firefox. (I chose Firefox because I knew it wasn't already installed on my system.) It can be applied to any package you need!
 
Old 08-14-2011, 06:53 PM   #6
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,883
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
InstallingSoftware - Community Ubuntu Documentation : https://help.ubuntu.com/community/In...ngSoftware#Use apt-offline
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How apt-get update offline? bt101 Linux - Software 5 08-11-2010 02:47 PM
LXer: Create a Local Ubuntu Repository using Apt-Mirror and Apt-Cacher LXer Syndicated Linux News 0 08-04-2009 10:13 PM
Apt-cacher offline mode problem Paralel Linux - Software 0 03-15-2009 05:56 PM
apt pinning /etc/apt/apt.conf parent's_basement Debian 5 10-26-2008 05:50 PM
is it possible to use APT offline? marta Debian 9 10-23-2003 02:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:12 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