当前位置: 首页>>技术教程>>正文


如何在不安装某些依赖项的情况下安装软件包?

, ,

问题描述

我正在尝试安装LaTeXila包,输出如下所示:

$ sudo apt-get install latexila --no-install-recommends
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  latexila-data latexmk luatex tex-common texlive-base texlive-binaries
  texlive-common texlive-doc-base texlive-latex-base
Suggested packages:
  rubber texlive-latex-extra debhelper
Recommended packages:
  texlive texlive-latex-recommended texlive-luatex lmodern
  texlive-latex-base-doc
The following NEW packages will be installed:
  latexila latexila-data latexmk luatex tex-common texlive-base
  texlive-binaries texlive-common texlive-doc-base texlive-latex-base
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 29.3 MB of archives.
After this operation, 74.5 MB of additional disk space will be used.
Do you want to continue [Y/n]?

我不想安装texlive包。我已经从http://www.tug.org/texlive/手动安装了texlive。有什么建议么?

最佳解决方案

apt-get不会这样做,但是dpkg会。

apt-get download latexila latexila-data

这将下载二进制.deb文件,但不会尝试安装它们。

现在您可以使用dpkg强制安装它们。

dpkg --force-all -i <name of the .deb files you downloaded>

我将在dpkg手册页中回显警告:

警告:这些选项主要仅供专家使用。使用它们而不完全了解它们的影响可能会破坏整个系统。

如果您的系统在尝试此操作后损坏,您可以尝试删除latexila和latexila-data。祝你好运。

次佳解决方案

以下是TeX Live and Debian/Ubuntu上TUG页面后面的说明:

  1. Install vanilla TeX Live as root, system-wide.
  2. Ensure that the only Debian TeX Live packages installed are tex-common, texinfo, and perhaps lmodern.
  3. Add TeX Live’s bin directory to ENV_PATH in /etc/login.defs.
  4. Tell APT about your TeX Live installation by building a dummy package using equivs:
     $ aptitude install equivs # as root     mkdir /tmp/tl-equivs && cd /tmp/tl-equivs     equivs-control texlive-local     # edit texlive-local (see below)     $ equivs-build texlive-local     $ sudo dpkg -i texlive-local_2011-1_all.deb 

At the step “edit texlive-local”, edit the Maintainer field and the list of the packages provided by your local TeX Live installation as appropriate. If you installed scheme-full except collection-texinfo as recommended, the file should look like this example

(基本上,必须创建一个虚拟包以欺骗apt-get)

有关其他方法,请参阅TeX.SX上的How to install “vanilla” TeXLive on Debian or Ubuntu?

第三种解决方案

做完之后

aptitude install [packagename]

您有问题是否要安装所有提到的软件包..如果有一个您不希望安装的软件包,如mysql-server,因为它被卸载到另一台服务器,其中包含了回答y /n答案的问题

:mysql-server

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/1106.html,未经允许,请勿转载。