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

Ale*_*lex 87 apt dependencies

我正在尝试安装包 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]?
Run Code Online (Sandbox Code Playgroud)

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

ach*_*ang 87

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

apt-get download latexila latexila-data
Run Code Online (Sandbox Code Playgroud)

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

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

dpkg --force-all -i <name of the .deb files you downloaded>
Run Code Online (Sandbox Code Playgroud)

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

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

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

  • @WolterHellmund 这绝对不是公认的答案,因为忽略依赖项会导致数据库不一致,这会在您升级包或安装相关包时造成麻烦。正确的解决方案是 equivs,[由 henrique 推荐](http://askubuntu.com/a/218294)。 (5认同)

hen*_*que 14

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

  1. 以 root 身份在系统范围内安装 vanilla TeX Live。
  2. 确保唯一安装的 Debian TeX Live 软件包是tex-commontexinfo、 或者lmodern
  3. 将 TeX Live 的 bin 目录添加到ENV_PATHin /etc/login.defs.
  4. 通过使用equivs以下命令构建一个虚拟包来告诉 APT 你的 TeX Live 安装:


    $ 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

在“edit texlive-local”步骤中,根据需要编辑Maintainer 字段和本地TeX Live 安装提供的包列表。如果您安装了scheme-fullcollection-texinfo建议,文件应该像这个例子

(基本上,必须创建一个虚拟包来愚弄apt-get

对于其他方式,另请参阅如何在 Debian 或 Ubuntu 上安装“vanilla”TeXLive?在 TeX.SX 上。

  • 我认为这是正确的答案。 (2认同)

小智 6

做完之后

aptitude install [packagename]
Run Code Online (Sandbox Code Playgroud)

如果您想安装提到的所有软件包,您会遇到问题。

:mysql-server
Run Code Online (Sandbox Code Playgroud)


Arc*_*ahi 6

查找不满足依赖性的软件包列表。

下载 .deb 文件apt-get download。然后使用

sudo dpkg -i --ignore-depends=<package(s) to ignore> package.deb