为 emacs 安装添加源 URI

adding source URI for emacs install

我正在尝试通过以下 PPA 在我的 ubuntu 16.04 系统上安装 emacs 25.1:

https://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa

我已将 Ubuntu Emacs Daily Snapshot PPA 添加到我的系统,并尝试安装构建依赖项。

我运行:

>sudo apt install build-essential checkinstall

然后:

>sudo apt-get build-dep emacs24

但我得到以下输出:

Reading package lists... Done
E: You must put some 'source' URIs in your sources.list

我认为这意味着 apt-get 无法找到构建依赖项,这不是将 PPA 添加到我的系统的原因

>sudo add-apt-repository ppa:ubuntu-elisp/ppa
>sudo apt-get update

应该更正了吧?我通过单独取消注释所有 deb 和 deb-src 行对来编辑 /etc/apt 中的 sources.list 文件,但这并没有解决问题。

您不需要 build-dep 安装 emacs 快照。只要确保你 运行

sudo add-apt-repository ppa:ubuntu-elisp/ppa
sudo apt-get update

如你所说,然后

sudo apt-get install emacs-snapshot
sudo update-alternatives --config emacs

和selectemacs-snapshot.

(我收集到 build-dep 抱怨的源 URI 在 /etc/apt/sources.list.d/ubuntu-elisp-ppa-xenial.list 中,但正如我所说,除非你要编译 emacs,否则你不需要它。)

这个问题可以通过以下步骤解决:

  1. 从“系统设置”打开 'Softwares & Updates'。
  2. 在 'Ubuntu Softwares' 中,检查 'Downloadable from the Internet' 部分中的 source code。然后系统会自动apt-get update下载源码
  3. 然后就可以安装emacs的依赖了