How to install apt-offline package into Debian 10 (Buster)

Hi Robert,

I cannot install apt-offline package into BeagleBone Black running Debian 10 (buster):
image

I run the command : sudo apt-get update before the above installation.

Thank You,

David

HI @dzhou, apt-offline missed the buster release cycle:

There is a backport version:

give me a little bit of time…

Edit: okay try now:

debian@bbb-pwr01-ser09:~$ sudo apt update
Get:1 http://repos.rcn-ee.com/debian buster InRelease [3,063 B]
Hit:2 http://deb.debian.org/debian buster InRelease  
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Hit:4 http://deb.debian.org/debian-security buster/updates InRelease
Get:5 http://repos.rcn-ee.com/debian buster/main armhf Packages [1,635 kB]                                                                 
Fetched 1,638 kB in 13s (131 kB/s)                                                                                                         
Reading package lists... Done
Building dependency tree       
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
debian@bbb-pwr01-ser09:~$ sudo apt install apt-offline
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  python3-debianbts python3-httplib2 python3-magic python3-pycurl python3-pysimplesoap
Suggested packages:
  libcurl4-gnutls-dev python-pycurl-doc python3-pycurl-dbg
The following NEW packages will be installed:
  apt-offline python3-debianbts python3-httplib2 python3-magic python3-pycurl python3-pysimplesoap
0 upgraded, 6 newly installed, 0 to remove and 3 not upgraded.
Need to get 211 kB of archives.
After this operation, 813 kB of additional disk space will be used.
Do you want to continue? [Y/n]

Regards,

Hi Robert,

It is working. Thank you very much.

Best Regards,

David

Hi Robert,

I am trying to install/update BBBw without internet for the first time setup. For example, to install minicom package by offline: (as the first step on a new board )
sudo apt-offline set --install-packages minicom --update apt-offline.sig
or
sudo apt-offline set vim-offline.sig --install-packages vim

I got the following errors: ( the msg of the second command for vim is pasted below)

debian@beaglebone:~/usb/pkg_install$ sudo apt-offline set vim-offline.sig --install-packages vim
Traceback (most recent call last):
File “/usr/bin/apt-offline”, line 25, in
from apt_offline_core.AptOfflineCoreLib import main
File “/usr/lib/python3/dist-packages/apt_offline_core/AptOfflineCoreLib.py”, line 45, in
import apt
ModuleNotFoundError: No module named ‘apt’

Did I miss anything? What are the commands to setup for an offline installation?

Thank you,
David

Hi @dzhou, sorry i’ve never used apt-offline:

Take a look at the man pages:

try the examples at the bottom.

Regards,

Hi Robert,

I tried the commands in the Sequence 1. It fails with with same error msg as I posted previously. I am wondering why it fails.

I had packages downloaded for offline installation, but for the default-jre it seems not easy thing to do. Even I did the same way to install using deb files ( keeping the the sequence of installation for dependent files) as installed through on-line commands, it still fails, and many certificates are not installed as on-line commands. Any suggestions?

Best Regards,

David

Yeah…

debian@bbb-pwr01-ser09:~$ sudo apt-offline set update.sig --update
Traceback (most recent call last):
  File "/usr/bin/apt-offline", line 25, in <module>
    from apt_offline_core.AptOfflineCoreLib import main
  File "/usr/lib/python3/dist-packages/apt_offline_core/AptOfflineCoreLib.py", line 45, in <module>
    import apt
ModuleNotFoundError: No module named 'apt'

So it’s broken… now we know why it wasn’t included in buster…

sudo apt install python3-apt
debian@bbb-pwr01-ser09:~$ sudo apt-offline set update.sig --update
Gathering details needed for 'update' operation
debian@bbb-pwr01-ser09:~$ 

Regards,

Hi Robert,

It seems to be related to a bug in the apt-offline version 1.8.2 and fixed at version 1.8.2.2:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959085

I am going download 1.8.2.2, and try again.

Thank You,

David

sure, building… Just install python3-apt that’s part of the fix.

Regards,

Works on version 1.8.2.2.

Best Regards,

David

Hi Robert,

I am still having the issues with apt-offline installation. The problem is mainly with update. I got the errors:
ERROR: Failed to unlink temproary file /var/lib/apt/lists/partial/deb.debian.org_debian-security_dists_buster_updates_contrib_binary-all_Packages.xzapt-offline. Check respective decompressor library support
deb.debian.org_debian-security_dists_buster_updates_contrib_binary-all_Packages.xz synced

And sometimes I had to manually to twice for installing a package. I have tried many different ways. Here is my steps for offline installation:

  1. On a machine with new installation (Debian 10, buster)
    installed apt-offline.deb with dependent files

  2. sudo apt-offline set update.sig --update
    I got error:
    image

  3. Then I gets update first for the machine:
    sudo apt-get update

  4. After update, I did the second step, again
    sudo apt-offline set update.sig --update
    it has no errors.

  5. sudo apt-offline get update.sig --bundle update.zip
    It has errors:
    image

    image

  6. If I ignore these errors, I got installation errors:

If I installed twice with zip files, at end, all updates I needed are installed successfully. But I cannot automate this without errors.

I am not sure, I did right.

Thank you,

David

All pre-built images ship with apt’s cache blank… This saves 2~300Mb’s in space…

The generation of “Packages.lzma” hasn’t been required for years, besides it “already” got “Package.xz” right above it… The Server side files are listed in this file:

http://repos.rcn-ee.net/debian/dists/buster/Release

So that’s an apt-offline bug…

That’s not my server.

The correct place to report/fix these issues is: https://github.com/rickysarraf/apt-offline/issues

Regards,

Hi Robert,
Thank you very much.
David

Hi Robert,

I am still having issues with offline installation of default-jre on debian buster. Offline tool has bug, I believe. I downloaded all the deb files and couldn’t make it work. I recorded installation messages using apt-get on-line installation, which works. But when I manually install with the same dependent sequence, I still cannot install it. It seems getting into dependent loop: A needs B, B needs C, but C needs A, again.
Here is my screen dump:

Installing ca-certificate needs default-jre-headless;
installing default-jre-head-less needs open-jdk-jre-headless;
And open-jdk-jre-headless needs ca-certificate-java;

Don’t know how on-line installation is done.

Your help is greatly appreciated.

Best Regards,

David

HI @dzhou, apt handles this natively, but while using dpkg you need to pass other options to “force” the install:

–force-things, --no-force-things, --refuse-things
Force or refuse (no-force and refuse mean the same thing) to do some things. things is a comma separated list of things specified below. --force-help displays a message describing them. Things marked with (*) are forced by default.

Warning: These options are mostly intended to be used by experts only. Using them without fully understanding their effects may break your whole system.

Regards,

Hi Robert,
Finally, I got default-jre installed without network.
Thank you for your support.
David