kelleyk/ppa-emacs

Packages still conflict with Ubuntu-provided packages

kelleyk opened this issue · 12 comments

As reported by @BenSchmidtTech in #3

THANKS FOR ALL YOUR EFFORTS! I am also experiencing this issue.

$ sudo apt install emacs27
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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 0 not upgraded.
Need to get 0 B/21.9 MB of archives.
After this operation, 95.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 362562 files and directories currently installed.)
Preparing to unpack .../emacs27-common_27.1~1.git86d8d76aa3-kk2+18.04_all.deb ...
Unpacking emacs27-common (27.1~1.git86d8d76aa3-kk2+18.04) ...
dpkg: error processing archive /var/cache/apt/archives/emacs27-common_27.1~1.git86d8d76aa3-kk2+18.04_all.deb (--unpack):
 trying to overwrite '/usr/include/emacs-module.h', which is also in package emacs26-common 26.3~1.git96dd019-kk1+18.04
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+18.04_amd64.deb ...
Unpacking emacs27 (27.1~1.git86d8d76aa3-kk2+18.04) ...
Errors were encountered while processing:
 /var/cache/apt/archives/emacs27-common_27.1~1.git86d8d76aa3-kk2+18.04_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

My original installation was done on a clean install of 18.04 using the ppa/kelleyk with emacs26 and I updated to emacs27. I manage the installation using an ansible-playbook, so I can provide the reproducer for the installation and the upgrade error for troubleshooting.

Same here.

Apologies for the trouble, everyone. I made the packaging improvements that I mentioned, but I didn't actually test them in all of the various scenarios that people might run into.

When I have some time, I'll make sure that the emacs27 packages don't conflict with the Ubuntu-provided ones, and then I'll backport those packaging changes to the emacs26 packages so that both can be installed side-by-side.

@kelleyk I know you said "When I have some time", but Is there any update?

bump here too. Having all sorts of issues here unfortunately

I'm sorry, I haven't managed to make the time yet. If anyone is familiar with Debian packaging and is interested in helping, that would be lovely.

Otherwise, I imagine that the eventual solution will be to change the packaging to borrow more from the upstream Debian/Ubuntu packaging.

If you just want to run emacs27 you could overwrite the conflicting file like so: sudo apt-get -o Dpkg::Options::="--force-overwrite" install emacs27-common

If you just want to run emacs27 you could overwrite the conflicting file like so: sudo apt-get -o Dpkg::Options::="--force-overwrite" install emacs27-common

Thanks goes to @chirremeddirre this worked for me and saved lots of effort

Just wondering if there's any resolution on this? Want to keep stock emacs 26.1 and run 27 or 28 side by side, but getting same conflict from the PPAs:

% - apt install emacs27
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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 40 not upgraded.
Need to get 0 B/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
(Reading database ... 565636 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)
% 

Same for emacs28 -- running up to date Mint 20.2.

Thanks

Just wondering if there's any resolution on this? Want to keep stock emacs 26.1 and run 27 or 28 side by side, but getting same conflict from the PPAs:

% - apt install emacs27
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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 40 not upgraded.
Need to get 0 B/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
(Reading database ... 565636 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)
% 

Same for emacs28 -- running up to date Mint 20.2.

Thanks

can you install this from source code or maybe can you try to download the installable file and not installing from the apt package manager? I'm not sure that this is the right solution or not but it might help you.

Unfortunately, I suspect doing that will overwrite the stock emacs26 installation, which is what I was trying to avoid. If I didn't want to keep both installed, I could just apt remove 26 and install 27 or 28 from PPA. Might end up doing that in the end.
I was hoping to have them side by side in case I ran into incompatibilities with my setup (which is what happened last time I tried this using a snap and ended up going back because didn't have time/patience to sort out the init.el issues).

I try every single thing that was mention on #3 and here but I still have the same error :(

jelou@jelou:~/Documents$ sudo apt --purge remove emacs emacs-common emacs27
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'emacs-common' is not installed, so not removed
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 emacs-bin-common : Depends: emacs-common (= 1:26.3+1-1ubuntu2)
 emacs-el : Depends: emacs-common (= 1:26.3+1-1ubuntu2)
 emacs-gtk : Depends: emacs-common (= 1:26.3+1-1ubuntu2)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
jelou@jelou:~/Documents$ 
jelou@jelou:~/Documents$ sudo apt-get -o Dpkg::Options::="--force-overwrite" install emacs27-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
emacs27-common is already the newest version (27.1~1.git86d8d76aa3-kk2+20.04).
emacs27-common set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 emacs-bin-common : Depends: emacs-common (= 1:26.3+1-1ubuntu2)
 emacs-el : Depends: emacs-common (= 1:26.3+1-1ubuntu2)
 emacs-gtk : Depends: emacs-common (= 1:26.3+1-1ubuntu2)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
jelou@jelou:~/Documents$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  emacs-common
Suggested packages:
  emacs-common-non-dfsg
The following NEW packages will be installed:
  emacs-common
0 upgraded, 1 newly installed, 0 to remove and 509 not upgraded.
4 not fully installed or removed.
Need to get 0 B/13,3 MB of archives.
After this operation, 68,4 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 359051 files and directories currently installed.)
Preparing to unpack .../emacs-common_1%3a26.3+1-1ubuntu2_all.deb ...
Unpacking emacs-common (1:26.3+1-1ubuntu2) ...
dpkg: error processing archive /var/cache/apt/archives/emacs-common_1%3a26.3+1-1ubuntu2_all.deb (--unpack):
 trying to overwrite '/usr/include/emacs-module.h', which is also in package emacs27-common 27.1~1.git86d8d76aa3-kk2+20.04
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/emacs-common_1%3a26.3+1-1ubuntu2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)