如何獲取包的 .deb 檔案的直接鏈接

如何獲取包的 .deb 檔案的直接鏈接

我想從我的 Ubuntu 軟體中心安裝一個應用程序,但下載起來有點大(它是紡織製造商約 760 MB)。

我目前就讀於一所大學,我們提供一項服務,可以透過該服務提交一份直接的連結到文件,然後以高頻寬下載該文件。

現在我的問題是,如何獲得 Ubuntu 軟體中心目前可用的軟體包的直接連結?

答案1

的輸出中有一個 .deb 檔案的相對路徑apt-cache show

$ apt-cache show texmaker | grep ^Filename
Filename: pool/universe/t/texmaker/texmaker_4.4.1-1_amd64.deb

apt-cache policy顯示包的儲存庫:

carvalho@S6-STI-N04:~ $ apt-cache policy texmaker
texmaker:
  Installed: (none)
  Candidate: 4.4.1-1
  Version table:
     4.4.1-1 0
        500 http://archive.ubuntu.com/ubuntu/ wily/universe amd64 Packages

您只需將儲存庫基本 URL(輸出http://archive.ubuntu.com/ubuntu/中的最後一行apt-cache policy)與檔案的相對路徑連接起來:

http://archive.ubuntu.com/ubuntu/pool/universe/t/texmaker/texmaker_4.4.1-1_amd64.deb

當然,您必須對要安裝的套件及其所有依賴項重複此操作。

答案2

只需訪問此鏈接http://www.xm1math.net/texmaker/download.html#linux並選擇您的口味。

然後您可以使用以下命令安裝它:

sudo dpkg -i texmaker_ubuntu*.deb

但您應該考慮到,您可能會遇到依賴問題。

另請注意,官方網站中的大小deb略低於 13MB,因此就您所說的而言,這證明還有許多其他依賴項。

您可以使用檢查任何套件依賴項apt-cache depends package-name

$ apt-cache depends texmaker

範例輸出:

texmaker
  Depends: libc6
  Depends: libgcc1
  Depends: libpoppler-qt4-3
  Depends: libqt4-network
  Depends: libqt4-xml
  Depends: libqtcore4
  Depends: libqtgui4
  Depends: libqtwebkit4
  Depends: libstdc++6
  Depends: zlib1g
  Depends: texmaker-data
  Recommends: aspell
  Recommends: ghostscript
    ghostscript:i386
  Recommends: netpbm
  Recommends: psutils
    psutils:i386
  Recommends: texlive-latex-extra
 |Recommends: <hunspell-dictionary>
    hunspell-an
    hunspell-ar
    hunspell-da
    hunspell-de-at
    hunspell-de-at-frami
    hunspell-de-ch
    hunspell-de-ch-frami
    hunspell-de-de
    hunspell-de-de-frami
    ............

相關內容