0

I tried to upgrade from Ubuntu 14.04 to 15.04, but I got error:

@ubuntu14:/etc/apt$ sudo apt-get upgrade
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:
 perl : Depends: perl-modules (>= 5.20.2-2ubuntu0.1) but 5.18.2-2ubuntu1.1 is installed
        Recommends: rename but it is not installed
E: Unmet dependencies. Try using -f.

Then trying "sudo apt-get -f install":

@ubuntu14:/etc/apt$ 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:
  libguice-java libidl-common libidl0 liborbit2
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libalgorithm-c3-perl libcgi-fast-perl libcgi-pm-perl libclass-c3-perl
  libclass-c3-xs-perl libcpan-meta-perl libdata-optlist-perl
  libdata-section-perl libfcgi-perl libmodule-build-perl
  libmodule-signature-perl libmro-compat-perl libpackage-constants-perl
  libparams-util-perl libpod-readme-perl libregexp-common-perl
  libsoftware-license-perl libsub-exporter-perl libsub-install-perl
  libtext-template-perl perl-modules
Suggested packages:
  libb-lint-perl libcpanplus-dist-build-perl libcpanplus-perl
  libfile-checktree-perl liblog-message-perl libobject-accessor-perl
The following NEW packages will be installed:
  libalgorithm-c3-perl libcgi-fast-perl libcgi-pm-perl libclass-c3-perl
  libclass-c3-xs-perl libcpan-meta-perl libdata-optlist-perl
  libdata-section-perl libfcgi-perl libmodule-build-perl
  libmodule-signature-perl libmro-compat-perl libpackage-constants-perl
  libparams-util-perl libpod-readme-perl libregexp-common-perl
  libsoftware-license-perl libsub-exporter-perl libsub-install-perl
  libtext-template-perl
The following packages will be upgraded:
  perl-modules
1 upgraded, 20 newly installed, 0 to remove and 208 not upgraded.
23 not fully installed or removed.
Need to get 0 B/3,585 kB of archives.
After this operation, 2,588 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up util-linux (2.25.2-4ubuntu3) ...
insserv: Service mountdevsubfs has to be enabled to start service hwclock
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package util-linux (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 util-linux
E: Sub-process /usr/bin/dpkg returned an error code (1)

cat /etc/lsb-release

ubuntu14:/etc/apt$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=15.04
DISTRIB_CODENAME=vivid
DISTRIB_DESCRIPTION="Ubuntu 15.04"

Any idea how to fix?

7
  • 2
    Why are you upgrading to a version that is unsupported? Please upgrade to 16.04 instead.
    – edwinksl
    Commented Dec 27, 2016 at 18:41
  • You do not (skip) upgrade from 14.04 to 15.04, if you manually edited your source file then you're running an unsupported system. I suggest you to backup and reinstall.
    – xangua
    Commented Dec 27, 2016 at 18:41
  • I did not want to upgrade to 16.04, because it uses openjdk-8-jdk, but I want to build Resurrection Remix ROM Marshmallow, which uses openjdk-7-jdk. Also Ubuntu 15.04 has openjdk-7-jdk.
    – klor
    Commented Dec 27, 2016 at 19:01
  • But you won't get security updates for neither Java nor the rest of your system. That aside, you cannot upgrade from 14.04 to 15.04 directly, you need to upgrade to 14.10 first. Commented Dec 27, 2016 at 19:48
  • 1
    You can still install OpenJDK 7 or OracleJDK 7 in Ubuntu 16.04 – just not from the default repositories. Commented Dec 28, 2016 at 1:26

1 Answer 1

0

Solved by downloading Ubuntu Server 16.04 ISO, and installed over the old bad Ubuntu installation.

Did not format /dev/sda1 system partition, reassigned as root partition, so I kept the /home/user content, did not lose them. I had to recreate the /etc/fstab, because it got overwritten.

So I saved almost all data, except the settings in /etc and earlier installed packages, which had to be installed again.

I hope this solution helps others with similar problems.

Not the answer you're looking for? Browse other questions tagged .