Como instalar um pacote específico com dependências usando o comando apt-offline?

1

Instalei o apt-offline na máquina de reboque executando debian jessie pc1 (online) e pc2 (offline).

Estou usando o seguinte comando:

sudo apt-key exportall | sudo gpg --no-default-keyring --import --keyring /etc/apt/trusted.gpg
para corrigir chave ausente e atualizar com sucesso pc2, o problema é que o arquivo de assinatura não pode ser gerado para algum pacote como dkms . Eu estou usando o seguinte comando para obter o arquivo de assinatura:
apt-offline set debian-install.sig --install-packages dkms

É possível instalar um pacote específico como dkms e linux-headers no pc2 usando o comando apt-offline ?

    
por GAD3R 19.04.2016 / 18:31

2 respostas

1

Este é um contêiner jessie. Mais tarde abaixo, há a operação 'get' que executei na minha caixa Debian Unstable regular.

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.

Operação 'get' no 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 ♒♒♒  ☺  

E agora, quando você fizer uma instalação na caixa 'off-line', ele não solicitará o download de nenhum byte extra.

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:~# 
    
por 21.04.2016 / 19:46
2

Você deve ser capaz de resolver isso. Por favor, siga a documentação aqui: link

E você só deve usar a versão 1.7 mais recente, do Debian Backports. Eu recentemente empurrei isso para lá. Ele resolve muitos bugs que estavam presentes no apt-offline do Debian Jessie.

link

    
por 20.04.2016 / 19:27