为什么我无法在 ubuntu12.04 中安装 Latex?

为什么我无法在 ubuntu12.04 中安装 Latex?

当我运行时,$ sudo apt-get install texlive-latex-base 它显示以下错误。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libgraphite3 libkpathsea6 libptexenc1 libreadline5 libruby1.8 lmodern luatex
  ruby ruby1.8 tex-common texlive-base texlive-binaries texlive-common
  texlive-doc-base texlive-latex-base-doc texlive-luatex
Suggested packages:
  ri ruby-dev ruby1.8-examples ri1.8 perl-tk
The following NEW packages will be installed:
  libgraphite3 libkpathsea6 libptexenc1 libreadline5 libruby1.8 lmodern luatex
  ruby ruby1.8 tex-common texlive-base texlive-binaries texlive-common
  texlive-doc-base texlive-latex-base texlive-latex-base-doc texlive-luatex
0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded.
Need to get 35.0 MB/102 MB of archives.
After this operation, 201 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://ppa.launchpad.net/texlive-backports/ppa/ubuntu/ precise/main lmodern all 2.004.1-5~precise1
Connection failed
Err http://ppa.launchpad.net/texlive-backports/ppa/ubuntu/ precise/main texlive-binaries i386 2012.20120628-1~ubuntu12.04.1
Connection failed
Failed to fetch http://ppa.launchpad.net/texlive-backports/ppa/ubuntu/pool/main/l/lmodern/lmodern_2.004.1-5~precise1_all.deb  Connection failed
Failed to fetch http://ppa.launchpad.net/texlive-backports/ppa/ubuntu/pool/main/t/texlive-bin/texlive-binaries_2012.20120628-1~ubuntu12.04.1_i386.deb  Connection failed
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我也尝试过,$ sudo apt-get install --fix-missing texlive-latex-base但显示错误

naveen@naveen-Inspiron-3521:~$ sudo apt-get install --fix-missing texlive-latex-base
[sudo] password for naveen: 
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
lmodern luatex tex-common texlive-base texlive-binaries texlive-common
texlive-doc-base texlive-latex-base-doc texlive-luatex
Suggested packages:
perl-tk
The following NEW packages will be installed:
lmodern luatex tex-common texlive-base texlive-binaries texlive-common
texlive-doc-base texlive-latex-base texlive-latex-base-doc texlive-luatex
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 48.2 MB/87.6 MB of archives.
After this operation, 169 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://archive.ubuntu.com/ubuntu/ precise/main texlive-binaries i386 2009-11ubuntu2
Connection failed [IP: 91.189.92.201 80]
Err http://archive.ubuntu.com/ubuntu/ precise/main texlive-latex-base-doc all 2009-15
Connection failed [IP: 91.189.91.13 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/t/texlive-bin/texlive-binaries_2009-11ubuntu2_i386.deb  Connection failed [IP: 91.189.92.201 80]
Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/t/texlive-base/texlive-latex-base-doc_2009-15_all.deb  Connection failed [IP: 91.189.91.13 80]
Unable to correct missing packages.

    E: Aborting install.

我怎样才能摆脱这个问题?

答案1

当我选择自定义服务器进行更新时,我也遇到了此类问题。如果这些存储库不可用,则会出现此类问题。

首先转到dashboard并搜索software and updates。现在像这样更改选项并选择download from选项Main Server
在此处输入图片描述

现在打开终端(ctrl++ alt) 输入t

sudo apt-get clean && sudo apt-get update

完成上一操作后

sudo apt-get upgrade

进而

sudo apt-get install --fix-missing

现在,这将使您与主存储库保持同步。然后尝试您的操作

sudo apt-get install texlive-latex-base

答案2

  1. 更新程序包

    sudo apt-get update

  2. 或者使用 --fix-missing 选项

    sudo apt-get install --fix-missing texlive-latex-base

相关内容