[SOLVED] update error message

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
sandpounder
Level 1
Level 1
Posts: 24
Joined: Sat Nov 30, 2019 2:13 pm

[SOLVED] update error message

Post by sandpounder »

I've been getting this error message after every update, seems like weeks now.
error.png
After closing the dialogue box, I end up with a system is up to date green checkmark. I suspect everything is fine, but...

Any thoughts?

Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
RIH
Level 9
Level 9
Posts: 2909
Joined: Sat Aug 22, 2015 3:47 am

Re: update error message

Post by RIH »

I suggest that you look in Software Sources from the Menu.
There look at the Additional Repositories tab.

Is the check box under the original installation disk ticked?
If so, uncheck it - or Remove that source completely - your choice..

If not have you another, erroneous source ??
Image
sandpounder
Level 1
Level 1
Posts: 24
Joined: Sat Nov 30, 2019 2:13 pm

Re: update error message

Post by sandpounder »

Thank you for your quick reply.

I've opened the software sources/additional repositories tab. I have winehq as the only listed and checked option here. I've unchecked it, and will wait for the next available update.
RIH
Level 9
Level 9
Posts: 2909
Joined: Sat Aug 22, 2015 3:47 am

Re: update error message

Post by RIH »

I don't think that winehg is causing the issue, sorry.

I have done Google on the error & it looks like it is probably a bug that effects a few people.
Sorry, don't know if there is a cure, but I suspect that it is not much more than annoying if your updates are still going through..
Image
sleeper12
Level 21
Level 21
Posts: 14609
Joined: Thu May 25, 2017 3:22 pm

Re: update error message

Post by sleeper12 »

Does this give any further clues:

Code: Select all

 sudo dpkg --configure -a 
sandpounder
Level 1
Level 1
Posts: 24
Joined: Sat Nov 30, 2019 2:13 pm

Re: update error message

Post by sandpounder »

RIH wrote: Fri Jun 18, 2021 11:35 pm I have done Google on the error & it looks like it is probably a bug that effects a few people.
You know, I tried searching a few days in and found next to nothing at all. Some discussions were deep dives well beyond my pay grade. Kudos to you kind poster for wading in. I appreciate your efforts more than these words will convey.
sleeper12 wrote: Sat Jun 19, 2021 1:55 am Does this give any further clues:

Code: Select all

 sudo dpkg --configure -a 
To me? No? :oops:

Code: Select all

Setting up ubuntu-advantage-tools (27.1~18.04.1) ...
/var/lib/dpkg/info/ubuntu-advantage-tools.postinst: 5: .: Can't open /etc/os-release
dpkg: error processing package ubuntu-advantage-tools (--configure):
 installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 ubuntu-advantage-tools
sleeper12
Level 21
Level 21
Posts: 14609
Joined: Thu May 25, 2017 3:22 pm

Re: update error message

Post by sleeper12 »

This worked for someone on a reddit site. Might be worth a try:

Code: Select all

 /var/lib/dpkg/info/ubuntu-advantage-tools.postinst 

Code: Select all

 sudo apt install ubuntu-advantage-tools 
sandpounder
Level 1
Level 1
Posts: 24
Joined: Sat Nov 30, 2019 2:13 pm

Re: update error message

Post by sandpounder »

sleeper12 wrote: Sat Jun 19, 2021 11:43 am This worked for someone on a reddit site. Might be worth a try:

Code: Select all

 /var/lib/dpkg/info/ubuntu-advantage-tools.postinst 

Code: Select all

$  /var/lib/dpkg/info/ubuntu-advantage-tools.postinst 
/var/lib/dpkg/info/ubuntu-advantage-tools.postinst: 5: .: Can't open /etc/os-release

Code: Select all

 sudo apt install ubuntu-advantage-tools 

Code: Select all

$ sudo apt install ubuntu-advantage-tools 
[sudo] password for home:        
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ubuntu-advantage-tools is already the newest version (27.1~18.04.1).
The following packages were automatically installed and are no longer required:
  linux-headers-4.15.0-132 linux-headers-4.15.0-132-generic linux-headers-4.15.0-134
  linux-headers-4.15.0-134-generic linux-headers-4.15.0-135 linux-headers-4.15.0-135-generic
  linux-headers-4.15.0-136 linux-headers-4.15.0-136-generic linux-headers-4.15.0-137
  linux-headers-4.15.0-137-generic linux-headers-4.15.0-139 linux-headers-4.15.0-139-generic
  linux-headers-4.15.0-140 linux-headers-4.15.0-140-generic linux-headers-4.15.0-141
  linux-headers-4.15.0-141-generic linux-headers-4.15.0-142 linux-headers-4.15.0-142-generic
  linux-image-4.15.0-132-generic linux-image-4.15.0-134-generic linux-image-4.15.0-135-generic
  linux-image-4.15.0-136-generic linux-image-4.15.0-137-generic linux-image-4.15.0-139-generic
  linux-image-4.15.0-140-generic linux-image-4.15.0-141-generic linux-image-4.15.0-142-generic
  linux-modules-4.15.0-132-generic linux-modules-4.15.0-134-generic linux-modules-4.15.0-135-generic
  linux-modules-4.15.0-136-generic linux-modules-4.15.0-137-generic linux-modules-4.15.0-139-generic
  linux-modules-4.15.0-140-generic linux-modules-4.15.0-141-generic linux-modules-4.15.0-142-generic
  linux-modules-extra-4.15.0-132-generic linux-modules-extra-4.15.0-134-generic
  linux-modules-extra-4.15.0-135-generic linux-modules-extra-4.15.0-136-generic
  linux-modules-extra-4.15.0-137-generic linux-modules-extra-4.15.0-139-generic
  linux-modules-extra-4.15.0-140-generic linux-modules-extra-4.15.0-141-generic
  linux-modules-extra-4.15.0-142-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up ubuntu-advantage-tools (27.1~18.04.1) ...
/var/lib/dpkg/info/ubuntu-advantage-tools.postinst: 5: .: Can't open /etc/os-release
dpkg: error processing package ubuntu-advantage-tools (--configure):
 installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 ubuntu-advantage-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
I guess a follow up question then, the line suggesting a course of action "Use 'sudo apt autoremove' to remove them."
Follow that path?
DAMIEN1307

Re: update error message

Post by DAMIEN1307 »

"Use 'sudo apt autoremove' to remove them." Follow that path?
Yep...You've got a build up of at least 5 or 6 kernels that were superceeded and that you never deleted or cleaned out when your update manager updated to newest kernels in the series and are taking up close to about 1.8 gigs of space...If you run...sudo apt autoremove...every so often, you wont get that problem...DAMIEN
sleeper12
Level 21
Level 21
Posts: 14609
Joined: Thu May 25, 2017 3:22 pm

Re: update error message

Post by sleeper12 »

Yes, certainly do sudo apt autoremove

Also, try:

Code: Select all

 sudo apt-get install --reinstall ubuntu-advantage-tools 
User avatar
ricardogroetaers
Level 6
Level 6
Posts: 1374
Joined: Sat Oct 27, 2018 3:06 am
Location: Rio de Janeiro, Brasil

Re: update error message

Post by ricardogroetaers »

sandpounder wrote: Fri Jun 18, 2021 10:22 pm I've been getting this error message after every update, seems like weeks now.
Most of the time, it doesn't mean anything.
- Open synaptic.
- Settings -> preferences -> files -> delete package files from cache.
This will force synaptic to redownload the package to reinstall it.
- Reinstall the package.
Attachments
Captura de tela_2021-06-20_03-38-37.png
sandpounder
Level 1
Level 1
Posts: 24
Joined: Sat Nov 30, 2019 2:13 pm

Re: update error message

Post by sandpounder »

I wanted to thank everyone for your thoughts/suggestions. I've run the auto remove command, and followed with the reinstall. Again ending with the same error message. For now I am resigned to the slightly quirky finish.

I attempted going through the synaptic package manager instructions. It didn't seem to do anything. It's likely user error and I'll revisit this again.

At some point there will be a random update through the manager. I'll revisit this again then.

Thank you all.
sandpounder
Level 1
Level 1
Posts: 24
Joined: Sat Nov 30, 2019 2:13 pm

Re: update error message

Post by sandpounder »

The Firefox update dropped today, it was like the first school dance after braces.

I got the same result. also like the first school dance after braces.

My social ineptitudes aside, I'm wondering if the ubuntu-advantage-tools package is a necessary package?

Code: Select all

(Reading database ... 287628 files and directories currently installed.)
Preparing to unpack .../firefox_89.0.1+linuxmint1+tricia_amd64.deb ...
Unpacking firefox (89.0.1+linuxmint1+tricia) over (89.0+linuxmint1+tricia) ...
Preparing to unpack .../firefox-locale-en_89.0.1+linuxmint1+tricia_amd64.deb ...
Unpacking firefox-locale-en (89.0.1+linuxmint1+tricia) over (89.0+linuxmint1+tricia) ...
Setting up ubuntu-advantage-tools (27.1~18.04.1) ...
/var/lib/dpkg/info/ubuntu-advantage-tools.postinst: 5: .: Can't open /etc/os-release
dpkg: error processing package ubuntu-advantage-tools (--configure):
 installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 2
Setting up firefox-locale-en (89.0.1+linuxmint1+tricia) ...
Setting up firefox (89.0.1+linuxmint1+tricia) ...
Please restart all running instances of firefox, or you will experience problems.
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23+linuxmint5) ...
Processing triggers for mintsystem (8.5.1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Errors were encountered while processing:
 ubuntu-advantage-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up ubuntu-advantage-tools (27.1~18.04.1) ...
/var/lib/dpkg/info/ubuntu-advantage-tools.postinst: 5: .: Can't open /etc/os-release
dpkg: error processing package ubuntu-advantage-tools (--configure):
 installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 ubuntu-advantage-tools

I found the answer to is it necessary.
t42 wrote: Fri May 14, 2021 2:32 am This package is needed because otherwise ubuntu-minimal will be removed, which is not recommended.
Otherwise it is your free will to subscribe or not for ubuntu live-patch service or other ones.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: update error message

Post by Termy »

The issue is:

Code: Select all

/var/lib/dpkg/info/ubuntu-advantage-tools.postinst: 5: .: Can't open /etc/os-release
...and appears to have nothing to do with having several kernel versions installed. That file should exist, so it's kinda strange that it isn't found unless Mint recently did away with it. Here's what mine looks like on a different but similar system:

Code: Select all

NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
You could track down the values for your system, then create the file yourself at '/etc/os-release', making sure it's owned by 'root' and with permissions of '644'; sudo chown 0:0 /etc/os-release and sudo chmod 644 /etc/os-release will do that for you, once you've made the file.

It's also worth mentioning that my 'os-release' file is actually a symbolic link to '/usr/lib/os-release', so if your '/etc/os-release' file is truly missing, and you have an appropriate '/usr/lib/os-release' file, you could try setting up a symbolic link with: sudo ln -s /usr/lib/os-release /etc/os-release

To clarify:

A symbolic link is more like a link in Windows. The 'root' user is like 'administrator' in Windows. Finally, '644' means the owner of the file can read from and write to the file, the group to which the file is assigned can only read from the file, and everybody else can only read from the file; standard approach for system-wide, non-executable, non-sensitive files.

To elaborate on what I believe is going on with the error message:

Most packages come with scripts (mini programs) for certain actions like the purging, installation, and regular removal of a package; these basically allow for certain things to occur in those events. In this case, a command in the 'postinst' script (executes when a package is installed) is trying to do something with '/etc/os-release' but it's not found, thus an exit status of 1 is given, meaning 'error'. I used to do a lot of Debian packaging for my own programs, hence why I know this stuff. :lol:
I'm also Terminalforlife on GitHub.
sandpounder
Level 1
Level 1
Posts: 24
Joined: Sat Nov 30, 2019 2:13 pm

Re: update error message

Post by sandpounder »

I thought I'd revisit this thread as things are the same, and worse, but also seemingly fine.

The explanation. os-release the file does not exist on my system. I haven't been able to discover why it's missing, likely something I did. I have attempted to recreate the file a few times with less than satisfactory results. Nothing disastrous. Just disappointing results.

A new development is another missing component, ubuntu-minimal. Synaptic assures me it's still there, presumably doing it's thing, but it's "missing" according to post update dialog boxes.

However once I've clicked through the error messages, I still end with a green "everything is good" check mark.

One of these days I'll do a proper upgrade. Until then, if there is anything someone might think of, I'm game.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: update error message

Post by Termy »

sandpounder wrote: Wed Nov 02, 2022 8:53 pm [...]
You could try reinstalling that package with the below code. However, you might want to back the system up first, because it might try to install a ton of crap that doesn't coincide with Linux Mint; just depends how Linux Mint is put together. It's also possible that the package has changed in recent Ubuntu or its implementation in Linux Mint.

Code: Select all

sudo apt-get install --reinstall ubuntu-minimal
It's possible that file is what's responsible for generation the previously-missing file. You might want to move the file you created somewhere else before installing that package, just in-case, else it might ignore the existing file and not try to generate a 'proper' file.
I'm also Terminalforlife on GitHub.
sandpounder
Level 1
Level 1
Posts: 24
Joined: Sat Nov 30, 2019 2:13 pm

Re: update error message

Post by sandpounder »

Termy wrote: Tue Jun 22, 2021 8:06 pm The issue is:

Code: Select all

/var/lib/dpkg/info/ubuntu-advantage-tools.postinst: 5: .: Can't open /etc/os-release
...and appears to have nothing to do with having several kernel versions installed. That file should exist...
I'd like to thank everyone that's looked at, and more those that have suggested various fixes for this little quirk.
It seems that my last attempt at recreating os-release, and the instructions for making it work provided by Termy
Termy wrote: Tue Jun 22, 2021 8:06 pm You could track down the values for your system, then create the file yourself at '/etc/os-release', making sure it's owned by 'root' and with permissions of '644'; sudo chown 0:0 /etc/os-release and sudo chmod 644 /etc/os-release will do that for you, once you've made the file.
have, it appears, fixed this issue for me.
Locked

Return to “Beginner Questions”