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

我正在尝试安装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  

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

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

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

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

  1. 在系统范围内以root用户身份安装vanilla TeX Live。
  2. 确保安装的唯一Debian TeX Live软件包是tex-commontexinfo ,也许是lmodern
  3. 将TeX Live的bin目录添加到/etc/login.defs ENV_PATH
  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 

在“编辑texlive-local”步骤中,根据需要编辑Maintainer字段和本地TeX Live安装提供的软件包列表。 如果您按照建议安装了scheme-full除了collection-texinfo ,那么该文件应该如下所示

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

有关其他方法,另请参阅如何在Debian或Ubuntu上安装“vanilla”TeXLive? 在TeX.SX.

做完之后

 aptitude install [packagename] 

你有一个问题,如果你想安装所有提到的软件包..如果有一个你不想安装的软件包,如mysql-server,因为它被卸载到另一个服务器,无法回答你的答案

 :mysql-server 

找到不满足依赖关系的包列表。

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

sudo dpkg -i --ignore-depends= package.deb