elv*_*o79 39 emacs aptitude ubuntu
我想从http://emacs.orebokech.com安装 emacs-snapshot 但是 Ubuntu 的存储库中已经有一个 emacs-snapshot。
如何指定将安装软件包的存储库?
小智 32
您可以使用-t
选项指定存储库。例如,我添加了以下存储库/etc/apt/sources.list
来安装 Iceweasel 最新版本:
deb http://mozilla.debian.net/ squeeze-backports iceweasel-release
如您所知iceweasel
,官方 Debian 存储库中有相同的软件包。如果我想从这个特定的 repo 安装 Iceweasel,我运行:
apt-get install -t squeeze-backports iceweasel
Run Code Online (Sandbox Code Playgroud)
来自 apt-get 手册页:
-t, --target-release, --default-release
This option controls the default input to the policy engine, it creates a default pin at priority 990 using the specified
release string. This overrides the general settings in /etc/apt/preferences. Specifically pinned packages are not affected by
the value of this option. In short, this option lets you have simple control over which distribution packages will be retrieved
from. Some common examples might be -t '2.1*', -t unstable or -t sid. Configuration Item: APT::Default-Release; see also the
apt_preferences(5) manual page.
Run Code Online (Sandbox Code Playgroud)
我认为这是一个更好的解决方案,
来源:https : //askubuntu.com/questions/27362/how-to-only-install-updates-from-a-specific-repository/57749#57749
elv*_*o79 16
我找到了一个解决方法。首先,我需要找到包含 pacakage 的存储库:
$ apt-cache showpkg emacs-snapshot
Package: emacs-snapshot
Versions:
1:20100111-1~lenny1 (/var/lib/apt/lists/emacs.orebokech.com_dists_lenny_main_binary-amd64_Packages) (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/emacs.orebokech.com_dists_lenny_main_binary-amd64_Packages
MD5: 906df684c212eabe267e6b5c2e8c2032
1:20090909-1 (/var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_karmic_universe_binary-amd64_Packages)
Description Language:
File: /var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_karmic_universe_binary-amd64_Packages
MD5: 906df684c212eabe267e6b5c2e8c2032
Reverse Depends: ...
...
Run Code Online (Sandbox Code Playgroud)
在版本:部分。我看到来自不同存储库的版本:
所以现在我们只需告诉 apt 或 aptitude 安装该特定版本:
$ sudo aptitude install emacs-snapshot=1:20100111-1~lenny1
Run Code Online (Sandbox Code Playgroud)
包名= version_name
胜利。
我仍然不知道如何使用特定的存储库。但在这种情况下,特定版本就足够了。