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

**URL:** <https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474>\
**Category:** Linux Discussions\
**Created:** [November 30, 2020, 3:39pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474 "2020-11-30T15:39:51Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![dzhou](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dzhou](https://forum.digikey.com/u/dzhou)\
**Post date:** [November 30, 2020, 3:39pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/1 "2020-11-30T15:39:51Z")

</div>

Hi Robert,

I cannot install apt-offline package into BeagleBone Black running Debian 10 (buster):  
 ![image](https://global.discourse-cdn.com/digikey/original/2X/1/11b116d2a390c808ecbe8e96008451df62aa2193.png)

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

Thank You,

David

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [November 30, 2020, 3:45pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/2 "2020-11-30T15:45:42Z")

</div>

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

> **[Debian -- Details of package apt-offline in stretch](https://packages.debian.org/stretch/apt-offline)**

There is a backport version:

> **[Debian -- Details of package apt-offline in buster-backports](https://packages.debian.org/buster-backports/apt-offline)**

give me a little bit of time…

Edit: okay try now:

```auto
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,

---

<div class="post-metadata">

**Author:** ![dzhou](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dzhou](https://forum.digikey.com/u/dzhou)\
**Post date:** [November 30, 2020, 3:59pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/3 "2020-11-30T15:59:48Z")

</div>

Hi Robert,

It is working. Thank you very much.

Best Regards,

David

---

<div class="post-metadata">

**Author:** ![dzhou](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dzhou](https://forum.digikey.com/u/dzhou)\
**Post date:** [November 30, 2020, 4:37pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/4 "2020-11-30T16:37:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [November 30, 2020, 4:42pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/5 "2020-11-30T16:42:21Z")

</div>

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

Take a look at the man pages:

> **[apt-offline(8) — apt-offline — Debian buster-backports — Debian Manpages](https://manpages.debian.org/buster-backports/apt-offline/apt-offline.8.en.html)**

try the examples at the bottom.

Regards,

---

<div class="post-metadata">

**Author:** ![dzhou](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dzhou](https://forum.digikey.com/u/dzhou)\
**Post date:** [November 30, 2020, 4:56pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/6 "2020-11-30T16:56:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [November 30, 2020, 5:04pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/7 "2020-11-30T17:04:06Z")

</div>

Yeah…

```auto
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…

```auto
sudo apt install python3-apt

```

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

```

Regards,

---

<div class="post-metadata">

**Author:** ![dzhou](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dzhou](https://forum.digikey.com/u/dzhou)\
**Post date:** [November 30, 2020, 5:04pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/8 "2020-11-30T17:04:15Z")

</div>

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](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959085)

I am going download 1.8.2.2, and try again.

Thank You,

David

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [November 30, 2020, 5:10pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/9 "2020-11-30T17:10:35Z")

</div>

> [@dzhou](#):
>
> I am going download 1.8.2.2, and try again.

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

Regards,

---

<div class="post-metadata">

**Author:** ![dzhou](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dzhou](https://forum.digikey.com/u/dzhou)\
**Post date:** [November 30, 2020, 5:17pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/10 "2020-11-30T17:17:20Z")

</div>

Works on version 1.8.2.2.

Best Regards,

David

---

<div class="post-metadata">

**Author:** ![dzhou](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dzhou](https://forum.digikey.com/u/dzhou)\
**Post date:** [December 4, 2020, 4:59pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/11 "2020-12-04T16:59:33Z")

</div>

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](https://global.discourse-cdn.com/digikey/original/2X/2/2d650baca4d7e3e4c911650cf7b0563c3f8997ea.png)

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](https://global.discourse-cdn.com/digikey/original/2X/9/9d60e1a907ee366072f8846f52be405899f550cf.png)

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

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [December 4, 2020, 6:18pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/12 "2020-12-04T18:18:44Z")

</div>

> [@dzhou](#):
>
> sudo apt-offline set update.sig --update  
> I got error:  
> ![image](https://global.discourse-cdn.com/digikey/original/2X/2/2d650baca4d7e3e4c911650cf7b0563c3f8997ea.png)

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

> [@dzhou](#):
>
> sudo apt-offline get update.sig --bundle update.zip  
> It has errors:  
> ![image](https://global.discourse-cdn.com/digikey/original/2X/9/9d60e1a907ee366072f8846f52be405899f550cf.png)

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](http://repos.rcn-ee.net/debian/dists/buster/Release)

So that’s an apt-offline bug…

> [@dzhou](#):
>
> If I ignore these errors, I got installation errors:
> 
> ![image](https://global.discourse-cdn.com/digikey/original/2X/0/0c4ae9a60f3ccc8f79789d19f4ad9310e48fa0ea.png)

That’s not my server.

The correct place to report/fix these issues is: [Issues · rickysarraf/apt-offline · GitHub](https://github.com/rickysarraf/apt-offline/issues)

Regards,

---

<div class="post-metadata">

**Author:** ![dzhou](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dzhou](https://forum.digikey.com/u/dzhou)\
**Post date:** [December 4, 2020, 7:21pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/13 "2020-12-04T19:21:45Z")

</div>

Hi Robert,  
Thank you very much.  
David

---

<div class="post-metadata">

**Author:** ![dzhou](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dzhou](https://forum.digikey.com/u/dzhou)\
**Post date:** [December 9, 2020, 5:59pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/14 "2020-12-09T17:59:00Z")

</div>

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:

 ![image](https://global.discourse-cdn.com/digikey/original/2X/3/39bc577e0027e840fc105fc65eedc7e3d8b2eb73.png)

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

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [December 9, 2020, 8:43pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/15 "2020-12-09T20:43:09Z")

</div>

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

> **[dpkg(1): package manager for Debian - Linux man page](https://linux.die.net/man/1/dpkg)**
>
> dpkg is a tool to install, build, remove and manage Debian packages. The primary and more user-friendly front-end for dpkg is aptitude(1). dpkg itself is ...

> –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,

---

<div class="post-metadata">

**Author:** ![dzhou](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dzhou](https://forum.digikey.com/u/dzhou)\
**Post date:** [December 11, 2020, 4:39pm UTC](https://forum.digikey.com/t/how-to-install-apt-offline-package-into-debian-10-buster/10474/16 "2020-12-11T16:39:45Z")

</div>

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