[SOLVED] Getting stuck at package preconfiguration during upgrade to Ubuntu 20.04
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Getting stuck at package preconfiguration during upgrade to Ubuntu 20.04
Hi there,
I'm trying to upgrade from my Ubuntu 19.10 to Ubuntu 20.04 through the GUI. It is now stuck at the 'Installing upgrades' for several hours. I know that it can sometimes take a long time but I tink there might be something wrong. I am afraid to shut down the computer or do anything else which might lead to data loss.
Here's the messages I get:
Preconfiguring packages ...
Preconfiguring packages ...
Preconfiguring packages ...
Preconfiguring packages ...
Selecting previously unselected package gcc-10-base:amd64.
(Reading database ... 269685 files and directories currently installed.)
Preparing to unpack .../gcc-10-base_10-20200411-0ubuntu1_amd64.deb ...
Unpacking gcc-10-base:amd64 (10-20200411-0ubuntu1) ...
Setting up gcc-10-base:amd64 (10-20200411-0ubuntu1) ...
Selecting previously unselected package libgcc-s1:amd64.
(Reading database ... 269690 files and directories currently installed.)
Preparing to unpack .../libgcc-s1_10_20200411-0ubuntu1_amd64.deb ...
Unpacking libgcc-s1:amd64 (10_20200411-0ubuntu1) ...
Replacing files in old package libgcc1:amd64 (1:9.2.1-9ubuntu2) ...
Setting up libgcc-s1:amd64 (10_20200411-0ubuntu1) ...
(Reading database ... 269692 files and directories currently installed.)
Preparing to unpack .../locales_2.31-0ubuntu9_all.deb ...
Unpacking locales (2.31-0ubuntu9) over (2.30-0ubuntu2.2) ...
Preparing to unpack .../libc6_2.31-0ubuntu9_amd64.deb ...
Checking for services that may need to be restarted...
Checking init scripts...
Checking for services that may need to be restarted...
Checking init scripts...
Stopping some services possibly affected by the upgrade (will be restarted later):
cron: stopping...done
Unpacking libc6:amd64 (2.31-0ubuntu9) over (2.30-0ubuntu2.2) ...
Selecting previously unselected package libcrypt1:amd64
Preparing to unpack .../libcrypt1_1%3a4.4.10-10ubuntu4_amd64.deb ...
Unpacking libcrypt1:amd64 (1:4.4.10-10ubuntu4) ...
Setting up libcrypt1:amd64 (1:4.4.10-10ubuntu4) ...
Setting up libc6:amd64 (2.31-0ubuntu9) ...
Checking for services that may need to be restarted...
Checking init scripts...
Restarting services possibly affected by the upgrade:
cron:restarting...done.
postfix: restarting...done.
gdm3: restarting...done.
cups: restarting...done.
Servicres restarted successfully.
(Reading database ... 269696 files and directories currently installed.)
Preparing to unpack .../libc-bin_2.31-0ubuntu9_amd64.deb ...
Unpacking libc-bin (2.31-0ubuntu9) over (2.30-0ubuntu2.2) ...
Setting up libc-bin (2.31-0ubuntu9) ...
(Reading database ... 269696 files and directories currently installed.)
Preparing to unpack .../libc6-dbg_2.31-0ubuntu9_amd64.deb ...
Unpacking libc6-dbg:amd64 (2.31-0ubuntu9) over (2.30-0ubuntu2.2) ...
Preparing to unpack .../libc-dev-bin 2.31-0ubuntu9 amd64.deb ...
Unpacking libc-dev-bin (2.31-0ubuntu9) over (2.30-0ubuntu2.2)
Preparing to unpack .../libc6-dev_2.31-0ubuntu9_amd64.deb
Unpacking libc6-dev:amd64 (2.31-0ubuntu9) over (2.30-0ubuntu2.2) ...
Selecting previously unselected package libcrypt-dev:amd64.
Preparing to unpack .../libcrypt-dev_1%3a4.4.10-10ubuntu4) ...
Unpacking libcrypt-dev:amd64 (1:4.4.10-10ubuntu4) ...
Setting up locales (2.31-0ubuntu9) ...
Installing new version of config file /etc/locale.alias ...
Generating locales (this might take a while)...
en_AG.UTF-8...done
en_AU.UTF-8...done
en_BW.UTF-8...done
en_CA.UTF-8...done
en_DK.UTF-8...done
en_GB.UTF-8...done
en_HK.UTF-8...done
en_IE.UTF-8...done
en_IL.UTF-8...done
en_IN.UTF-8...done
en_NG.UTF-8...done
en_NZ.UTF-8...done
en_PH.UTF-8...done
en_SG.UTF-8...done
en_US.UTF-8...done
en_ZA.UTF-8...done
en_ZM.UTF-8...done
en_ZW.UTF-8...done
Generation complete.
Setting up libc6-dbg:amd64 (2.31-0ubuntu9) ...
Setting up libcrypt-dev:amd64 (1:4.4.10-10ubuntu4) ...
Setting up libc-dev-bin (2.31-0ubuntu9) ...
Setting up libc6-dev:amd64 (2.31-0ubuntu9) ...
Processing triggers for man-db (2.8.7-3) ...
Extracting templates from packages: 100%
Preconfiguring packages ...
setting xserver-xorg-legacy/xwrapper/allowed_users from configuration file
update-alternatives: warning: alternative /usr/local/MATLAB/R2018b/bin/matlab (part of link group matlab) doesn't exist; removing from list of alternatives
update-alternatives: warning: /etc/alternatives/matlab is dangling; it will be updated with best choice
update-alternatives: using /usr/local/MATLAB/R2020a/bin/matlab to provide /usr/bin/matlab (matlab) in auto mode
update-alternatives: warning: skip creation of /usr/bin/matlab-mbuild because associated file /usr/local/MATLAB/R2020a/bin/mbuild (of link group matlab) doesn't exist
Extracting templates from packages: 100%
Preconfiguring packages ...
setting xserver-xorg-legacy/xwrapper/allowed_users from configuration file
It seems that there's a problem with some Matlab files. I recently installed Matlab R2020a, but maybe didn't remove everything from R2018b. Shall I uninstall Matlab completely? Or does it affect the upgrade when I do something like that simultaneously? If I need to reinstall Matlab after the upgrade, that would be okay, I just want to avoid losing any data unnecessarily.
To me, that reads like the package installer is already finished processing the Matlab packages and continued with xorg stuff. So there may be a problem with Matlab but that doesn't seem to be what's keeping the package installer from continuing.
Generally, if you try to remove any packages via a package installer while a package installer is already operating, you should get an error message from the second one, saying something about not being able to obtain a lock on the package database. (Or similar, assuming Ubuntu 20 is still working very similar to Debian.) So if you want to remove packages before the package installer is finished, you are forced to stop that package installer first.
You should not use the 10-seconds power button press nor remove the battery to stop it all, but you should be able to kill the package installer or shut down the system completely without causing any problems. After stopping it, just do sudo dpkg --configure -a to finish any installed but not configured packages and then you can continue with removing/installing packages as you like.
Just for clarification because I am still quite new to Linux: Are you suggesting that I force the distribution upgrade window (the one on the attached screenshot) to close through the system monitor, then restart the whole system and then run the
Code:
sudo dpkg --configure -a
command?
I will probably be able to do that, as I can use my laptop and all programs normally. I could also open a terminal and run the command above directly without shutting the system down first? I'm just worried that if I shut down then it might not be able to reboot because the installation is only half-way through.
Just for clarification because I am still quite new to Linux: Are you suggesting that I force the distribution upgrade window (the one on the attached screenshot) to close through the system monitor, then restart the whole system and then run the
Code:
sudo dpkg --configure -a
command?
I will probably be able to do that, as I can use my laptop and all programs normally. I could also open a terminal and run the command above directly without shutting the system down first? I'm just worried that if I shut down then it might not be able to reboot because the installation is only half-way through.
The very best,
Tamara
I agree with the not rebooting this is not windows, the time to do that is once the upgrade is done. The command to configure the not configured packages will run just fine in a terminal window that you have opened. If it tells you the package database in already locked then you will need to kill off the upgrade window you have open to run it. A couple of links below for doing it via the command line. The last a google search.
Configuration file '/etc/gnome/defaults.list'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** defaults.list (Y/I/N/O/D/Z) [default=N] ?
I expected that I would need to upgrade the system now with the update manager, but when I check for new releases I get this message:
Code:
sudo do-release-upgrade -d
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS development release
set Prompt=normal in /etc/update-manager/release-upgrades.
and
Code:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
So it seems to me that I have the new release installed already. Do you think it is safe to reboot the computer now? Or is there anything else I should do before?
Thanks again for the support, I hope this is also useful for other Linux users facing similar problems.
It does appear to have updated, the only thing left to do is reboot. I would take the opportunity to backup my important files first though, if possible.
Configuration file '/etc/gnome/defaults.list'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** defaults.list (Y/I/N/O/D/Z) [default=N] ?
I expected that I would need to upgrade the system now with the update manager, but when I check for new releases I get this message:
Code:
sudo do-release-upgrade -d
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS development release
set Prompt=normal in /etc/update-manager/release-upgrades.
and
Code:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
So it seems to me that I have the new release installed already. Do you think it is safe to reboot the computer now? Or is there anything else I should do before?
Thanks again for the support, I hope this is also useful for other Linux users facing similar problems.
I've had the same problem until i came here! ))
WORKED PERFECTLY FOR ME!!! Thank you!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.