Can only run Update Manager as sudo (from terminal)

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
hom_tanks
Level 1
Level 1
Posts: 22
Joined: Fri Sep 01, 2017 12:13 pm

Can only run Update Manager as sudo (from terminal)

Post by hom_tanks »

Hi

I recently upgraded from Mint 20 Ulyana to Una with the intention to do a bigger upgrade to Mint 21. The upgrade to Una worked fine. I did a timeshift backup and started to do a mintupgrade but decided to abort as there were many ppas I use that potentially were not supported, so I decided to hold off for the time being.

After this however, I cannot start Update Manager cleanly. The GUI comes up with a spinning circle but its stuck at that point (see image). If I start mintupdate from commandline, it has the same behaviour and it shows the following console output. I can however start w/o any problem if I do a sudo mintupdate.
These are the things I tried -
  • I did restore the Timeshift backup but made no difference.
  • I did do sudo apt update and it finished cleanly
  • I did sudo apt install --reinstall mintupdate, again no change
  • Also did sudo apt-get update && sudo apt-get dist-upgrade to no avail

Any thoughts?

Thanks for the help!

Code: Select all

me@cvg:~$ mintUpdate(6018): Operation not permitted
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1245: DeprecationWarning: Gdk.threads_init is deprecated
  Gdk.threads_init()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1393: DeprecationWarning: Gtk.ImageMenuItem.set_image is deprecated
  menuItem3.set_image(image)
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:731: DeprecationWarning: Gdk.threads_enter is deprecated
  Gdk.threads_enter()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:738: DeprecationWarning: Gdk.threads_leave is deprecated
  Gdk.threads_leave()
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintUpdate/checkAPT.py", line 355, in <module>
    check = APTCheck()
  File "/usr/lib/linuxmint/mintUpdate/checkAPT.py", line 26, in __init__
    self.cache = apt.Cache()
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 170, in __init__
    self.open(progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 234, in open
    self._records = apt_pkg.PackageRecords(self._cache)
apt_pkg.Error: E:Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_restricted_i18n_Translation-en - open (13: Permission denied)
-- Exception occurred in the refresh thread:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintUpdate/mintUpdate.py", line 838, in run
    self.application.builder.get_object("label_error_details").set_text(error_msg)
TypeError: Argument 1 does not allow None as a value
Attachments
updatemgr.png
Last edited by LockBot on Sun Oct 01, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
AZgl1800
Level 20
Level 20
Posts: 11183
Joined: Thu Dec 31, 2015 3:20 am
Location: Oklahoma where the wind comes Sweeping down the Plains
Contact:

Re: Can only run Update Manager as sudo (from terminal)

Post by AZgl1800 »

after a reread, I did not answer question, sorry

IIRC, those PPAs are listed at the end of the upgrade, so you can copy them to a text file, and then reinstall them
LM21.3 Cinnamon ASUS FX705GM | Donate to Mint https://www.patreon.com/linux_mint
Image
sleeper12
Level 21
Level 21
Posts: 14607
Joined: Thu May 25, 2017 3:22 pm

Re: Can only run Update Manager as sudo (from terminal)

Post by sleeper12 »

I don't know if it matters, but try reinstall without sudo:

Code: Select all

apt reinstall mintupdate

Code: Select all

mintupdate
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Can only run Update Manager as sudo (from terminal)

Post by Cosmo. »

"sudo mintupdate" is a typical mistake with the consequence of several types of problem. So keep the following rule in mind:

Never launch any graphical program with sudo (even if advised)!

For now, run the following command:

Code: Select all

sudo chown -R $USER:$USER $HOME
You do not get any output.

Timeshift is pointless in this case, because your problem is in your account, not in your system.
hom_tanks
Level 1
Level 1
Posts: 22
Joined: Fri Sep 01, 2017 12:13 pm

Re: Can only run Update Manager as sudo (from terminal)

Post by hom_tanks »

sleeper12 wrote: Sat Apr 01, 2023 8:37 pm I don't know if it matters, but try reinstall without sudo:

Code: Select all

apt reinstall mintupdate

Code: Select all

mintupdate
I reinstalled and relaunched this but it runs into an error when starting.

Code: Select all

myacct:~$ /usr/lib/linuxmint/mintUpdate/mintUpdate.py:1245: DeprecationWarning: Gdk.threads_init is deprecated
  Gdk.threads_init()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1393: DeprecationWarning: Gtk.ImageMenuItem.set_image is deprecated
  menuItem3.set_image(image)
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:731: DeprecationWarning: Gdk.threads_enter is deprecated
  Gdk.threads_enter()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:738: DeprecationWarning: Gdk.threads_leave is deprecated
  Gdk.threads_leave()
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintUpdate/checkAPT.py", line 355, in <module>
    check = APTCheck()
  File "/usr/lib/linuxmint/mintUpdate/checkAPT.py", line 26, in __init__
    self.cache = apt.Cache()
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 170, in __init__
    self.open(progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 234, in open
    self._records = apt_pkg.PackageRecords(self._cache)
apt_pkg.Error: E:Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_restricted_i18n_Translation-en - open (13: Permission denied)
-- Exception occurred in the refresh thread:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintUpdate/mintUpdate.py", line 838, in run
    self.application.builder.get_object("label_error_details").set_text(error_msg)
TypeError: Argument 1 does not allow None as a value
hom_tanks
Level 1
Level 1
Posts: 22
Joined: Fri Sep 01, 2017 12:13 pm

Re: Can only run Update Manager as sudo (from terminal)

Post by hom_tanks »

Cosmo. wrote: Sun Apr 02, 2023 3:57 am "sudo mintupdate" is a typical mistake with the consequence of several types of problem. So keep the following rule in mind:

Never launch any graphical program with sudo (even if advised)!

For now, run the following command:

Code: Select all

sudo chown -R $USER:$USER $HOME
You do not get any output.

Timeshift is pointless in this case, because your problem is in your account, not in your system.
I don't normally run it as sudo, I was just trying to troubleshoot. Objective is to run is as the logged in user but I am having an error and the hanging behaviour when I do it as my user

Code: Select all

myacct:~$ /usr/lib/linuxmint/mintUpdate/mintUpdate.py:1245: DeprecationWarning: Gdk.threads_init is deprecated
  Gdk.threads_init()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1393: DeprecationWarning: Gtk.ImageMenuItem.set_image is deprecated
  menuItem3.set_image(image)
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:731: DeprecationWarning: Gdk.threads_enter is deprecated
  Gdk.threads_enter()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:738: DeprecationWarning: Gdk.threads_leave is deprecated
  Gdk.threads_leave()
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintUpdate/checkAPT.py", line 355, in <module>
    check = APTCheck()
  File "/usr/lib/linuxmint/mintUpdate/checkAPT.py", line 26, in __init__
    self.cache = apt.Cache()
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 170, in __init__
    self.open(progress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 234, in open
    self._records = apt_pkg.PackageRecords(self._cache)
apt_pkg.Error: E:Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_restricted_i18n_Translation-en - open (13: Permission denied)
-- Exception occurred in the refresh thread:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintUpdate/mintUpdate.py", line 838, in run
    self.application.builder.get_object("label_error_details").set_text(error_msg)
TypeError: Argument 1 does not allow None as a value

I would like to note that I usually do run apt/apt-get update as sudo and it works fine and is working fine. Also, when I run the update manager GUI from Administration->Update Manger, it does ask me for sudo password. I don't know if running update as sudo in terminal is a preferred practice or not but that's how I've always done it.
hom_tanks
Level 1
Level 1
Posts: 22
Joined: Fri Sep 01, 2017 12:13 pm

Re: Can only run Update Manager as sudo (from terminal)

Post by hom_tanks »

So I saw someone suggest in an older post on a different forum these steps and that solved the problem for me

Code: Select all

sudo rm /var/lib/apt/lists/* -vf

sudo apt-get clean

sudo apt-get update
The GUI comes up fine after this.

Thanks for all your responses!
Locked

Return to “Software & Applications”