0

通过emacs-snapshot PPA将我的 Emacs 更新到最新版本(GNU Emacs 24.1.50.1)后:

sudo aptitude update
sudo aptitude safe-upgrade

当我使用 rinari 对 Rails 项目进行编程时收到警告。

我厌倦了等待作者解决这个问题。所以我决定将我的 Emacs '回滚'到我安装的先前版本。

我在/var/cache/apt/archives/目录中找到档案:

/var/cache/apt/archives/emacs-snapshot_2%3a20120608-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot_2%3a20120609-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot_2%3a20120614-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot_2%3a20120615-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot_2%3a20120622-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot_2%3a20120629-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot_2%3a20120701-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot-bin-common_2%3a20120608-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot-bin-common_2%3a20120609-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot-bin-common_2%3a20120614-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot-bin-common_2%3a20120615-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot-bin-common_2%3a20120622-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot-bin-common_2%3a20120629-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot-bin-common_2%3a20120701-1~ppa1~precise1_amd64.deb
/var/cache/apt/archives/emacs-snapshot-common_2%3a20120608-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-common_2%3a20120609-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-common_2%3a20120614-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-common_2%3a20120615-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-common_2%3a20120622-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-common_2%3a20120629-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-common_2%3a20120701-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-gtk_2%3a20120608-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-gtk_2%3a20120609-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-gtk_2%3a20120614-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-gtk_2%3a20120615-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-gtk_2%3a20120622-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-gtk_2%3a20120629-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-gtk_2%3a20120701-1~ppa1~precise1_all.deb

那么,如何安装指定版本(旧版本)的 Emacs?

4

1 回答 1

1

您可以选择您知道它正在运行的正确版本并手动安装它。请注意,包是相互关联的,因此您可能需要一组相应的文件,例如:

/var/cache/apt/archives/emacs-snapshot-common_2%3a20120608-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-gtk_2%3a20120608-1~ppa1~precise1_all.deb
/var/cache/apt/archives/emacs-snapshot-bin-common_2%3a20120608-1~ppa1~precise1_amd64.deb

当您确定所需的软件包版本时,只需使用以下命令安装它们dpkg

$ sudo dpkg -i file1.deb file2.deb ...

它可能会告诉您正在降级软件包,但您可以继续。您还可以卸载当前的 emacs 快照包。

另一种选择是通过强制版本从精确的存储库中选择要安装的版本。首先,您确定您在 repos 中可用的版本:

$ apt-cache show emacs-snapshot

这将告诉您类似的信息:

Package: emacs-snapshot
Priority: optional
Section: editors
Installed-Size: 14390
Version: 2:20120701-1~ppa1~precise1

然后,您可以强制安装一个版本

$ sudo apt-get install emacs-snapshot=2:20120701-1~ppa1~precise1

(可用包中显示的版本)。

于 2012-07-04T17:07:14.090 回答