0

Recently I've been unable to install or remove software packages on Ubuntu 17.04.

I run sudo apt update successfully with the last line of output reading:

8 packages can be upgraded. Run 'apt list --upgradable' to see them.

So I followed up with sudo apt upgrade :

sudo apt upgrade
[sudo] password for user:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  libpython3.5 libpython3.5-dev libpython3.5-minimal libpython3.5-stdlib
  python3.5 python3.5-dev python3.5-doc python3.5-minimal
8 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 49.3 MB of archives.
After this operation, 18.4 kB disk space will be freed.
Do you want to continue? [Y/n]
Get:1 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 python3.5-dev amd64 3.5.3-1ubuntu0~17.04.1 [413 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 libpython3.5-dev amd64 3.5.3-1ubuntu0~17.04.1 [37.7 MB]
Get:3 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 libpython3.5 amd64 3.5.3-1ubuntu0~17.04.1 [1,372 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 python3.5 amd64 3.5.3-1ubuntu0~17.04.1 [175 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 libpython3.5-stdlib amd64 3.5.3-1ubuntu0~17.04.1 [2,167 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 python3.5-minimal amd64 3.5.3-1ubuntu0~17.04.1 [1,635 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 libpython3.5-minimal amd64 3.5.3-1ubuntu0~17.04.1 [529 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 python3.5-doc all 3.5.3-1ubuntu0~17.04.1 [5,295 kB]
Fetched 49.3 MB in 24s (1,993 kB/s)                                            
(Reading database ... 1108124 files and directories currently installed.)
Preparing to unpack .../0-python3.5-dev_3.5.3-1ubuntu0~17.04.1_amd64.deb ...
Unpacking python3.5-dev (3.5.3-1ubuntu0~17.04.1) over (3.5.3-1ubuntu0~17.04.0) ...
Preparing to unpack .../1-libpython3.5-dev_3.5.3-1ubuntu0~17.04.1_amd64.deb ...
Unpacking libpython3.5-dev:amd64 (3.5.3-1ubuntu0~17.04.1) over (3.5.3-1ubuntu0~17.04.0) ...
Preparing to unpack .../2-libpython3.5_3.5.3-1ubuntu0~17.04.1_amd64.deb ...
Unpacking libpython3.5:amd64 (3.5.3-1ubuntu0~17.04.1) over (3.5.3-1ubuntu0~17.04.0) ...
Preparing to unpack .../3-python3.5_3.5.3-1ubuntu0~17.04.1_amd64.deb ...
Unpacking python3.5 (3.5.3-1ubuntu0~17.04.1) over (3.5.3-1ubuntu0~17.04.0) ...
Preparing to unpack .../4-libpython3.5-stdlib_3.5.3-1ubuntu0~17.04.1_amd64.deb ...
Unpacking libpython3.5-stdlib:amd64 (3.5.3-1ubuntu0~17.04.1) over (3.5.3-1ubuntu0~17.04.0) ...
Preparing to unpack .../5-python3.5-minimal_3.5.3-1ubuntu0~17.04.1_amd64.deb ...
Unpacking python3.5-minimal (3.5.3-1ubuntu0~17.04.1) over (3.5.3-1ubuntu0~17.04.0) ...
Preparing to unpack .../6-libpython3.5-minimal_3.5.3-1ubuntu0~17.04.1_amd64.deb ...
Unpacking libpython3.5-minimal:amd64 (3.5.3-1ubuntu0~17.04.1) over (3.5.3-1ubuntu0~17.04.0) ...
Preparing to unpack .../7-python3.5-doc_3.5.3-1ubuntu0~17.04.1_all.deb ...
Unpacking python3.5-doc (3.5.3-1ubuntu0~17.04.1) over (3.5.3-1ubuntu0~17.04.0) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu2) ...
Setting up python3.5-doc (3.5.3-1ubuntu0~17.04.1) ...
Processing triggers for dochelp (0.1.4) ...
E: /usr/share/doc-base/diveintopython-zh: Field "translator" is not allowed in section Document
Processing triggers for libc-bin (2.24-9ubuntu2.2) ...
Processing triggers for doc-base (0.10.7) ...
Processing 8 changed doc-base files, 2 added doc-base files...
Error while merging /usr/share/doc-base/inform-docs-dm4 with /usr/share/doc-base/inform-docs-ibg: format pdf already defined.
Registering documents with dwww...
Registering documents with dhelp...
Registering documents with scrollkeeper...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up emacs25 (25.1+1-3ubuntu4.1) ...
Install cmake-data for emacs25
install/cmake-data: Byte-compiling for emacs25
ln: failed to create symbolic link '/usr/share/emacs25/site-lisp/cmake-data/cmake-mode.el': File exists
Install emacsen-common for emacs25
emacsen-common: Handling install of emacsen flavor emacs25
Install php-elisp for emacs25
install/php-elisp: Handling install for emacsen flavor emacs25
Loading 00debian-vars...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Loading /etc/emacs/site-start.d/50cmake-data.el (source)...
Loading /etc/emacs/site-start.d/50devhelp.el (source)...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Info: Skip debian-el loading if run under dpkg control.
Loading /etc/emacs/site-start.d/50dictionary-el.el (source)...
Loading dictionary-init...
Loading /etc/emacs/site-start.d/50gforth.el (source)...
Loading /etc/emacs/site-start.d/50gnu-smalltalk-el.el (source)...
Loading /etc/emacs/site-start.d/50gnugo.el (source)...
Loading /etc/emacs/site-start.d/50ilisp.el (source)...
Loading /etc/ilisp/ilisp.el (source)...
Loading /etc/ilisp/ilisp-keybindings.el (source)...
Loading /etc/emacs/site-start.d/50lookup-el.el (source)...
Loading /etc/emacs/site-start.d/50mdk.el (source)...
Loading /etc/emacs/site-start.d/50php-elisp.el (source)...
Loading /etc/emacs/site-start.d/50pspp.el (source)...
Loading /etc/emacs/site-start.d/50pylint.el (source)...
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...
Loading /etc/emacs/site-start.d/60cltl.el (source)...
Loading /etc/emacs/site-start.d/60hyperspec.el (source)...
Install pspp for emacs25
install/pspp: Handling install for emacsen flavor emacs25
Loading 00debian-vars...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Loading /etc/emacs/site-start.d/50cmake-data.el (source)...
Loading /etc/emacs/site-start.d/50devhelp.el (source)...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Info: Skip debian-el loading if run under dpkg control.
Loading /etc/emacs/site-start.d/50dictionary-el.el (source)...
Loading dictionary-init...
Loading /etc/emacs/site-start.d/50gforth.el (source)...
Loading /etc/emacs/site-start.d/50gnu-smalltalk-el.el (source)...
Loading /etc/emacs/site-start.d/50gnugo.el (source)...
Loading /etc/emacs/site-start.d/50ilisp.el (source)...
Loading /etc/ilisp/ilisp.el (source)...
Loading /etc/ilisp/ilisp-keybindings.el (source)...
Loading /etc/emacs/site-start.d/50lookup-el.el (source)...
Loading /etc/emacs/site-start.d/50mdk.el (source)...
Loading /etc/emacs/site-start.d/50php-elisp.el (source)...
Loading /etc/emacs/site-start.d/50pspp.el (source)...
Loading /etc/emacs/site-start.d/50pylint.el (source)...
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...
Loading /etc/emacs/site-start.d/60cltl.el (source)...
Loading /etc/emacs/site-start.d/60hyperspec.el (source)...
Install pylint for emacs25
install/pylint: Handling install for emacsen flavor emacs25
Install lookup-el for emacs25
install/lookup-el: Handling install for emacsen flavor emacs25
Install mdk for emacs25
install/mdk: Handling install for emacsen flavor emacs25
Install dictionaries-common for emacs25
install/dictionaries-common: Already byte-compiled for emacs25. Skipping ...
Install gforth for emacs25
install/gforth: Handling install for emacsen flavor emacs25
Install gnu-smalltalk-el for emacs25
install/gnu-smalltalk-el: Handling install for emacsen flavor emacs25
cp: cannot create symbolic link './gst-mode.el' to '../../../emacs/site-lisp/gnu-smalltalk-el/gst-mode.el': File exists
cp: cannot create symbolic link './smalltalk-mode.el' to '../../../emacs/site-lisp/gnu-smalltalk-el/smalltalk-mode.el': File exists
ERROR: install script from gnu-smalltalk-el package failed
dpkg: error processing package emacs25 (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for gnome-menus (3.13.3-6ubuntu5) ...
Setting up libpython3.5-minimal:amd64 (3.5.3-1ubuntu0~17.04.1) ...
Setting up libpython3.5-stdlib:amd64 (3.5.3-1ubuntu0~17.04.1) ...
Setting up python3.5-minimal (3.5.3-1ubuntu0~17.04.1) ...
Setting up python3.5 (3.5.3-1ubuntu0~17.04.1) ...
Setting up libpython3.5:amd64 (3.5.3-1ubuntu0~17.04.1) ...
Setting up libpython3.5-dev:amd64 (3.5.3-1ubuntu0~17.04.1) ...
Setting up python3.5-dev (3.5.3-1ubuntu0~17.04.1) ...
Processing triggers for libc-bin (2.24-9ubuntu2.2) ...
Errors were encountered while processing:

emacs25 was not one of the 8 packages to be upgraded. Upon further inspection of the output, line 11 reports that 1 package is not fully installed or removed. I'm guessing this is the emacs25 package.

So, the 8 upgradeable packages cannot be upgraded. Further, I cannot remove the emacs25 package (nor any other). Also, I cannot install any new packages (nor emacs25).

How do I recover from this package management fiasco?

  • I have never seen this type of problem before, but if I were you, and simply going by the error messages, I would go in and rename the files that it is complaining about already existing. However this may be a symptom of a deeper permissions problem. – Organic Marble Sep 28 '17 at 23:15
  • Have you tried to reinstall the "not fully installed package" and then remove it? (sudo apt install --reinstall ...)? – user692175 Sep 28 '17 at 23:15
  • Yes, @MichaelBay. I have tried to install emacs25... but, as I said, sudo apt install AND sudo apt remove fail because of the twisted shape of the package database. – TheGeeko61 Sep 28 '17 at 23:17
  • Try sudo apt install -f... And I clearly mentioned reinstall (with the --reinstall argument). – user692175 Sep 28 '17 at 23:19
  • I'll try that, @OrganicMarble... and will update when I've completed. – TheGeeko61 Sep 28 '17 at 23:20

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.