user5@system:~$ sudo apt install --reinstall emacs24-bin-common
[sudo] password for user5:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
emacs24 : Depends: emacs24-bin-common (= 24.5+1-6ubuntu1) but 24.5+1-6ubuntu1.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
user5@system:~$ sudo apt-get -f install emacs24-bin-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
emacs24-bin-common is already the newest version (24.5+1-6ubuntu1.1).
emacs24-bin-common set to manually installed.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
emacs24 : Depends: emacs24-bin-common (= 24.5+1-6ubuntu1) but 24.5+1-6ubuntu1.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
user5@system:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-92 linux-headers-4.4.0-92-generic linux-image-4.4.0-92-generic
linux-image-extra-4.4.0-92-generic linux-signed-image-4.4.0-92-generic linux-tools-4.4.0-92
linux-tools-4.4.0-92-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
emacs24
The following packages will be upgraded:
emacs24
1 upgraded, 0 newly installed, 0 to remove and 84 not upgraded.
1 not fully installed or removed.
Need to get 0 B/3,352 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 372073 files and directories currently installed.)
Preparing to unpack .../emacs24_24.5+1-6ubuntu1.1_amd64.deb ...
/var/lib/dpkg/info/emacs24.prerm: 16: /var/lib/dpkg/info/emacs24.prerm: /usr/lib/emacsen-common/emacs-remove: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 16: /var/lib/dpkg/tmp.ci/prerm: /usr/lib/emacsen-common/emacs-remove: not found
dpkg: error processing archive /var/cache/apt/archives/emacs24_24.5+1-6ubuntu1.1_amd64.deb (--unpack):
subprocess new pre-removal script returned error exit status 127
update-alternatives: error: alternative path /usr/bin/emacs24-x doesn't exist
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/emacs24_24.5+1-6ubuntu1.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)