LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-02-2020, 04:30 PM   #1
8alym
LQ Newbie
 
Registered: May 2019
Posts: 15

Rep: Reputation: Disabled
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.

Any suggestions are highly appreciated!
 
Old 08-03-2020, 04:00 PM   #2
Ratamahatta
Member
 
Registered: Feb 2012
Location: Germany
Distribution: siduction
Posts: 134

Rep: Reputation: 17
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.
 
1 members found this post helpful.
Old 08-04-2020, 12:04 AM   #3
8alym
LQ Newbie
 
Registered: May 2019
Posts: 15

Original Poster
Rep: Reputation: Disabled
Hi Ratamahatta,

Thanks for your reply.

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
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2020-08-03 06-59-17.png
Views:	315
Size:	111.9 KB
ID:	33792  
 
Old 08-04-2020, 07:05 AM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by 8alym View Post
Hi Ratamahatta,

Thanks for your reply.

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.

https://phoenixnap.com/kb/upgrade-to-ubuntu-20-04
https://www.omgubuntu.co.uk/2020/04/...o-ubuntu-20-04
https://www.google.com/search?q=upgr...hrome&ie=UTF-8
 
1 members found this post helpful.
Old 08-07-2020, 09:29 AM   #5
8alym
LQ Newbie
 
Registered: May 2019
Posts: 15

Original Poster
Rep: Reputation: Disabled
Hi,

thank you for your help so far. I waited until the weekend with the upgrade as I didn't want to mess up my work schedule

So this is what I did so far:

I aborted the upgrade process and then run the following commands:

Code:
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get upgrade -y
then I was asked the following:

Code:
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 typed 'Y' and continued with

Code:
sudo apt-get dist-upgrade -y
sudo apt-get autoremove
sudo apt-get install update-manager-core
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.
 
Old 08-08-2020, 06:38 AM   #6
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
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.
 
Old 08-09-2020, 02:57 AM   #7
8alym
LQ Newbie
 
Registered: May 2019
Posts: 15

Original Poster
Rep: Reputation: Disabled
Everything seems to work well after the reboot, and no data got lost.
Thanks again for your help!
 
Old 08-09-2020, 05:54 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by 8alym View Post
Everything seems to work well after the reboot, and no data got lost.
Thanks again for your help!
Great, please mark your thread SOLVED now!

FWIW, quite a few people had this problem recently.
 
Old 10-05-2023, 05:16 AM   #9
mlykvai
LQ Newbie
 
Registered: Oct 2023
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by 8alym View Post
Hi,

thank you for your help so far. I waited until the weekend with the upgrade as I didn't want to mess up my work schedule

So this is what I did so far:

I aborted the upgrade process and then run the following commands:

Code:
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get upgrade -y
then I was asked the following:

Code:
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 typed 'Y' and continued with

Code:
sudo apt-get dist-upgrade -y
sudo apt-get autoremove
sudo apt-get install update-manager-core
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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] No package 'x11' found No package 'xext' found No package 'xdamage' found No package 'xfixes' found No package 'x11-xcb' found Jigsaw Linux From Scratch 14 02-23-2021 08:35 PM
After installing Ubuntu, computer becomes stuck on HP logo during boot heltonlw Ubuntu 1 06-11-2020 07:52 PM
Drive stuck, how to I un-stuck it. MikeyCarter Linux - Software 3 08-05-2009 11:57 AM
message "Problem during installation: x package needed for (installed) x package frayed2 Linux - Newbie 1 04-24-2005 07:05 PM
I'm Stuck, so Stuck. basttrax Linux - General 3 11-14-2003 09:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration