1

I have installed apt-offline on tow machine runing debian jessie pc1 (online) and pc2 (offline).

I am using the following command :

sudo apt-key exportall | sudo gpg --no-default-keyring --import --keyring /etc/apt/trusted.gpg
to fix missing key and successfully update pc2, the problem is that the signature file can not be generated for some package like dkms . I am using the following command to get the signature file :

apt-offline set debian-install.sig --install-packages dkms

Is that possible to install a specific package like dkms and linux-headers on pc2 using the command apt-offline ?

1

This is a jessie container. Later below, there is the 'get' operation that I ran on my regular Debian Unstable box.

rrs@learner:~$ machinectl start jessie 
2016-04-21 / 23:06:53 ♒♒♒  ☺  

rrs@learner:~$ machinectl login jessie 
Connected to machine jessie. Press ^] three times within 1s to exit session.

Debian GNU/Linux 8 learner pts/0

learner login: root
Password: 
Last login: Fri Apr 15 11:46:51 UTC 2016 on pts/0
Linux learner 4.5.0-1-amd64 #1 SMP Debian 4.5.1-1 (2016-04-14) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

root@learner:~# apt-cache policy dkms
dkms:
  Installed: (none)
  Candidate: 2.2.0.3-2
  Version table:
     2.2.0.3-2 0
        500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages

root@learner:~# sudo ^C
root@learner:~# apt-offline set /var/tmp/lxc/dkms.sig --install-packages dkms

Generating database of package ['dkms'] and its dependencies.

root@learner:~# apt-offline  --version
1.7

root@learner:~# apt-offline  install /var/tmp/lxc/dkms.zip 
libasan0_4.8.4-1_amd64.deb file synced.
libasan1_4.9.2-10_amd64.deb file synced.
libatomic1_4.9.2-10_amd64.deb file synced.
libcilkrts5_4.9.2-10_amd64.deb file synced.
libisl10_0.12.2-2_amd64.deb file synced.
libcloog-isl4_0.18.2-1+b2_amd64.deb file synced.
libgomp1_4.9.2-10_amd64.deb file synced.
libitm1_4.9.2-10_amd64.deb file synced.
liblsan0_4.9.2-10_amd64.deb file synced.
libmpfr4_3.1.2-2_amd64.deb file synced.
libquadmath0_4.9.2-10_amd64.deb file synced.
libtsan0_4.9.2-10_amd64.deb file synced.
libubsan0_4.9.2-10_amd64.deb file synced.
libmpc3_1.0.2-1_amd64.deb file synced.
binutils_2.25-5_amd64.deb file synced.
cpp-4.9_4.9.2-10_amd64.deb file synced.
cpp_4%3a4.9.2-2_amd64.deb file synced.
cpp-4.8_4.8.4-1_amd64.deb file synced.
libgcc-4.9-dev_4.9.2-10_amd64.deb file synced.
gcc-4.9_4.9.2-10_amd64.deb file synced.
gcc_4%3a4.9.2-2_amd64.deb file synced.
make_4.0-8.1_amd64.deb file synced.
dkms_2.2.0.3-2_all.deb file synced.
libfakeroot_1.20.2-1_amd64.deb file synced.
fakeroot_1.20.2-1_amd64.deb file synced.
libgcc-4.8-dev_4.8.4-1_amd64.deb file synced.
gcc-4.8_4.8.4-1_amd64.deb file synced.
libc-dev-bin_2.19-18+deb8u4_amd64.deb file synced.
linux-libc-dev_3.16.7-ckt25-1_amd64.deb file synced.
libc6-dev_2.19-18+deb8u4_amd64.deb file synced.
linux-compiler-gcc-4.8-x86_3.16.7-ckt25-1_amd64.deb file synced.
linux-headers-3.16.0-4-common_3.16.7-ckt25-1_amd64.deb file synced.
linux-kbuild-3.16_3.16.7-ckt20-1_amd64.deb file synced.
linux-headers-3.16.0-4-amd64_3.16.7-ckt25-1_amd64.deb file synced.
linux-headers-amd64_3.16+63_amd64.deb file synced.
manpages-dev_3.74-1_all.deb file synced.
menu_2.1.47_amd64.deb file synced.

'get' operation on Debian Unstable

rrs@learner:~$ apt-offline get /var/tmp/lxc/dkms.sig --bundle /var/tmp/lxc/dkms.zip --cache-dir /var/cache/apt/archives/ 

Fetching APT Data

libasan0 copied from local cache directory /var/cache/apt/archives/.                              
libasan1 copied from local cache directory /var/cache/apt/archives/.                              
libatomic1 copied from local cache directory /var/cache/apt/archives/.                              
libcilkrts5 copied from local cache directory /var/cache/apt/archives/.                              
libisl10 copied from local cache directory /var/cache/apt/archives/.                              
libcloog-isl4 copied from local cache directory /var/cache/apt/archives/.                              
libgomp1 copied from local cache directory /var/cache/apt/archives/.                              
libitm1 copied from local cache directory /var/cache/apt/archives/.                              
liblsan0 copied from local cache directory /var/cache/apt/archives/.                              
libmpfr4 copied from local cache directory /var/cache/apt/archives/.                              
libquadmath0 copied from local cache directory /var/cache/apt/archives/.                              
libtsan0 copied from local cache directory /var/cache/apt/archives/.                              
libubsan0 copied from local cache directory /var/cache/apt/archives/.                              
Downloading libmpc3 1.0.2-1 - 38 KiB                               
libmpc3 1.0.2-1 done.                                                            
binutils copied from local cache directory /var/cache/apt/archives/.                              
cpp-4.9 copied from local cache directory /var/cache/apt/archives/.                              
cpp copied from local cache directory /var/cache/apt/archives/.                              
cpp-4.8 copied from local cache directory /var/cache/apt/archives/.                              
libgcc-4.9-dev copied from local cache directory /var/cache/apt/archives/.                              
gcc-4.9 copied from local cache directory /var/cache/apt/archives/.                              
gcc copied from local cache directory /var/cache/apt/archives/.                              
make copied from local cache directory /var/cache/apt/archives/.                              
dkms copied from local cache directory /var/cache/apt/archives/.                              
libfakeroot copied from local cache directory /var/cache/apt/archives/.                              
fakeroot copied from local cache directory /var/cache/apt/archives/.                              
libgcc-4.8-dev copied from local cache directory /var/cache/apt/archives/.                              
gcc-4.8 copied from local cache directory /var/cache/apt/archives/.                              
Downloading libc-dev-bin 2.19-18+deb8u4 - 231 KiB                               
libc-dev-bin 2.19-18+deb8u4 done.                                                            
Downloading linux-libc-dev 3.16.7-ckt25-1 - 999 KiB                               
linux-libc-dev 3.16.7-ckt25-1 done.                                                            
Downloading libc6-dev 2.19-18+deb8u4 - 1 MiB                               
libc6-dev 2.19-18+deb8u4 done.                                                            
Downloading linux-compiler-gcc-4.8-x86 3.16.7-ckt25-1 - 315 KiB                               
linux-compiler-gcc-4.8-x86 3.16.7-ckt25-1 done.                                                            
Downloading linux-headers-3.16.0-4-common 3.16.7-ckt25-1 - 4 MiB                               
linux-headers-3.16.0-4-common 3.16.7-ckt25-1 done.                                                            
Downloading linux-kbuild-3.16 3.16.7-ckt20-1 - 169 KiB                               
linux-kbuild-3.16 3.16.7-ckt20-1 done.                                                            
Downloading linux-headers-3.16.0-4-amd64 3.16.7-ckt25-1 - 440 KiB                               
linux-headers-3.16.0-4-amd64 3.16.7-ckt25-1 done.                                                            
linux-headers-amd64 copied from local cache directory /var/cache/apt/archives/.                              
manpages-dev copied from local cache directory /var/cache/apt/archives/.                              
menu copied from local cache directory /var/cache/apt/archives/.                              
 37 /  37 items: [##############################] 100.0% of 38 MiB
Downloaded data to /var/tmp/lxc/dkms.zip
2016-04-21 / 23:09:04 ♒♒♒  ☺  

And now when you do an install on the 'offline' box, it won't ask for any extra byte to download.

root@learner:~# apt-get install dkms
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      binutils cpp cpp-4.8 cpp-4.9 fakeroot gcc gcc-4.8 gcc-4.9 libasan0 libasan1 libatomic1
      libc-dev-bin libc6-dev libcilkrts5 libcloog-isl4 libfakeroot libgcc-4.8-dev libgcc-4.9-dev
      libgomp1 libisl10 libitm1 liblsan0 libmpc3 libmpfr4 libquadmath0 libtsan0 libubsan0
      linux-compiler-gcc-4.8-x86 linux-headers-3.16.0-4-amd64 linux-headers-3.16.0-4-common
      linux-headers-amd64 linux-kbuild-3.16 linux-libc-dev make manpages-dev menu
    Suggested packages:
      binutils-doc cpp-doc gcc-4.8-locales gcc-4.9-locales gcc-multilib autoconf automake libtool
      flex bison gdb gcc-doc gcc-4.8-multilib gcc-4.8-doc libgcc1-dbg libgomp1-dbg libitm1-dbg
      libatomic1-dbg libasan0-dbg libtsan0-dbg libquadmath0-dbg gcc-4.9-multilib gcc-4.9-doc
      libasan1-dbg liblsan0-dbg libubsan0-dbg libcilkrts5-dbg glibc-doc make-doc menu-l10n gksu
      kde-runtime ktsuss
    Recommended packages:
      linux-image
    The following NEW packages will be installed:
      binutils cpp cpp-4.8 cpp-4.9 dkms fakeroot gcc gcc-4.8 gcc-4.9 libasan0 libasan1 libatomic1
      libc-dev-bin libc6-dev libcilkrts5 libcloog-isl4 libfakeroot libgcc-4.8-dev libgcc-4.9-dev
      libgomp1 libisl10 libitm1 liblsan0 libmpc3 libmpfr4 libquadmath0 libtsan0 libubsan0
      linux-compiler-gcc-4.8-x86 linux-headers-3.16.0-4-amd64 linux-headers-3.16.0-4-common
      linux-headers-amd64 linux-kbuild-3.16 linux-libc-dev make manpages-dev menu
    0 upgraded, 37 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0 B/40.7 MB of archives.
    After this operation, 155 MB of additional disk space will be used.
    Do you want to continue? [Y/n] ^C
    root@learner:~# 
1

You should be able to work it out. Please follow documentation here: http://www.researchut.com/tools/apt-offline

And you should only use the newer 1.7 version, from Debian Backports. I recently pushed it there. It solves a lot of bugs there were present in apt-offline from Debian Jessie.

http://www.researchut.com/blog/apt-offline-debian-jessie-backports

  • I am using the latest one 1.7 , it work perfectly to update , upgrade and install of some pckage , but i am not able to install some modules like dkms – GAD3R Apr 20 '16 at 18:59
  • It works just perfect. Please see the screen capture below. – RickyGoldsmith Apr 21 '16 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.