man
ページからapt-get
-d, --download-only
Download only; package files are only retrieved, not unpacked or installed. Configuration Item: APT::Get::Download-Only.
download
download will download the given binary package into the current directory.
それでは、次のコマンドの違いは何ですか?
apt-get download apache2
apt-get install --download-only apache2
最初のエラーが私に次のエラーを引き起こすのはなぜですか?
Get:1 http://gr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apache2 amd64 2.4.29-1ubuntu4.2 [95,1 kB]
Fetched 95,1 kB in 1s (102 kB/s)
W: Download is performed unsandboxed as root as file '/home/pkaramol/Desktop/apache2_2.4.29-1ubuntu4.2_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
ベストアンサー1
エラーを正確に見つけることはできませんでしたが、コマンドの違いは主に次のとおりです。
apt-get download apache2
.deb
現在wdにあるものだけをダウンロードします。
したがって、ダウンロード後の実行が依存関係のdpkg -i <filename>.deb
欠如によって失敗する可能性が高くなります。
apt-get install --download-only apache2
該当するものをダウンロードします.deb
そしてその依存関係は、/var/cache/apt/archives/
パッケージのキャッシュが実行される場所の下にあります。