apt-offline 명령을 사용하여 종속성이 있는 특정 패키지를 설치하는 방법은 무엇입니까?

apt-offline 명령을 사용하여 종속성이 있는 특정 패키지를 설치하는 방법은 무엇입니까?

apt-offline저는 debian jessie를 실행하는 두 대의 컴퓨터인 pc1(온라인)과 pc2(오프라인)에 설치했습니다 .

다음 명령을 사용하고 있습니다.

sudo apt-key exportall |
sudo gpg --no-default-keyring --import --keyring /etc/apt/trusted.gpg

누락된 키를 수정하고 pc2를 성공적으로 업데이트했습니다. 문제는 일부 패키지(예: dkms. 다음 명령을 사용하여 서명 파일을 가져옵니다.

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

및와 같은 명령을 사용하여 pc2에 특정 패키지를 설치할 수 있습니까 dkms?linux-headersapt-offline

답변1

이것은 Jesse 컨테이너입니다. 다음은 일반 Debian Unstable 시스템에서 제가 실행하는 "get" 작업입니다.

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.

Debian Unstable에서 "get" 작업

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 ♒♒♒  ☺  

이제 "오프라인" 상자에 설치할 때 추가 바이트를 다운로드하라는 메시지가 표시되지 않습니다.

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:~# 

답변2

이 문제를 해결할 수 있어야 합니다. 여기 문서를 따르십시오.http://www.researchut.com/tools/apt-offline

그리고 Debian Backports의 최신 1.7 버전만 사용해야 합니다. 최근에 거기로 밀어냈어요. Debian Jessie의 apt-offline에 존재하는 많은 버그를 해결합니다.

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

관련 정보