如何在 20.04.1 上通过 ppa 安装 Emacs 27.1?

如何在 20.04.1 上通过 ppa 安装 Emacs 27.1?

我有一个全新的 20.04.1 Ubuntu,我想安装 Emacs 27。apt-get 的标准 emacs 是 26.3,所以我想通过 ppa 安装它。

于是我运行software-properties-gtk,转到其他软件并添加ppa:kelleyk/emacs。出现一个弹出窗口,要求我更新软件包源,我确认。现在我尝试安装它:

$ sudo apt-get install emacs27
[sudo] password for myusername: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  emacs-bin-common emacs-common emacs-el emacs-gtk gsfonts imagemagick-6-common libfprint-2-tod1
  liblqr-1-0 libmagickcore-6.q16-6 libmagickwand-6.q16-6
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  emacs27-common
The following NEW packages will be installed:
  emacs27 emacs27-common
0 upgraded, 2 newly installed, 0 to remove and 12 not upgraded.
Need to get 21,9 MB of archives.
After this operation, 95,8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ppa.launchpad.net/kelleyk/emacs/ubuntu focal/main amd64 emacs27-common all 27.1~1.git86d8d76aa3-kk2+20.04 [18,2 MB]
Get:2 http://ppa.launchpad.net/kelleyk/emacs/ubuntu focal/main amd64 emacs27 amd64 27.1~1.git86d8d76aa3-kk2+20.04 [3.651 kB]
Fetched 21,9 MB in 5s (4.847 kB/s)   
Selecting previously unselected package emacs27-common.
(Reading database ... 185797 files and directories currently installed.)
Preparing to unpack .../emacs27-common_27.1~1.git86d8d76aa3-kk2+20.04_all.deb ...
Unpacking emacs27-common (27.1~1.git86d8d76aa3-kk2+20.04) ...
dpkg: error processing archive /var/cache/apt/archives/emacs27-common_27.1~1.git86d8d76aa3-kk2+20.04_all.deb (--unpack):
 trying to overwrite '/usr/include/emacs-module.h', which is also in package emacs-common 1:26.3+1-1ubuntu2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Selecting previously unselected package emacs27.
Preparing to unpack .../emacs27_27.1~1.git86d8d76aa3-kk2+20.04_amd64.deb ...
Unpacking emacs27 (27.1~1.git86d8d76aa3-kk2+20.04) ...
Errors were encountered while processing:
 /var/cache/apt/archives/emacs27-common_27.1~1.git86d8d76aa3-kk2+20.04_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

出现软件更新程序的弹出窗口:

The package system is brocken
Check if you are using third party repositories. If so disable them, since they are a common source of problems.
Furthermore run the following command in a Terminal: apt-get install -f
Transaction failed: The package system is broken
 The following packages have unmet dependencies:

emacs27: Depends: emacs27-common but it is not installed
         Depends: libgmp10 (>= 2:6.0.0) but 2:6.2.0+dfsg-4 is installed
         Depends: libice6 (>= 1:1.0.0) but 2:1.0.10-0ubuntu1 is installed
         Depends: libxfixes3 (>= 1:4.0.1) but 1:5.0.3-2 is installed
         Depends: zlib1g (>= 1:1.1.4) but 1:1.2.11.dfsg-2ubuntu1.1 is installed

sudo apt-get install libgmp10 libice6 libxfixes3 zlib1g显示它们已经安装。

答案1

因此,在使用 安装 emacs27-common 后,sudo apt-get install emacs27-common我可以emacs27使用进行安装sudo apt-get install emacs27。我不确定为什么这是必要的,因为两个包都在同一个 ppa 中...

相关内容