Software Manager doesn't Open

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
MaCK0y
Level 1
Level 1
Posts: 6
Joined: Fri Apr 16, 2021 6:33 am

Software Manager doesn't Open

Post by MaCK0y »

Hi,

First Post. :) Not a linux guru. I have had this problem for more than a year but I rarely install software and when I needed I used apt so I didn't bother to solve it but now I think certain updates related to this issue are breaking things.

I searched about this issue including this forum but nothing helped. Basically when I try to open Software Manager or Software Sources, they don't open. If I try to run mintinstall/mintsources from terminal I get the following:

Code: Select all

server@Server:~$ sudo mintinstall
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintinstall/mintinstall.py", line 27, in <module>
    from mintcommon.installer import installer
  File "/usr/lib/python3/dist-packages/mintcommon/installer/installer.py", line 10, in <module>
    from . import cache, _flatpak, _apt
  File "/usr/lib/python3/dist-packages/mintcommon/installer/cache.py", line 11, in <module>
    from . import _apt
  File "/usr/lib/python3/dist-packages/mintcommon/installer/_apt.py", line 11, in <module>
    import aptdaemon.client
  File "/usr/lib/python3/dist-packages/aptdaemon/client.py", line 1570
    async = reply_handler and error_handler
          ^
SyntaxError: invalid syntax
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 154, in apport_excepthook
    os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_lib_linuxmint_mintinstall_mintinstall.py.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintinstall/mintinstall.py", line 27, in <module>
    from mintcommon.installer import installer
  File "/usr/lib/python3/dist-packages/mintcommon/installer/installer.py", line 10, in <module>
    from . import cache, _flatpak, _apt
  File "/usr/lib/python3/dist-packages/mintcommon/installer/cache.py", line 11, in <module>
    from . import _apt
  File "/usr/lib/python3/dist-packages/mintcommon/installer/_apt.py", line 11, in <module>
    import aptdaemon.client
  File "/usr/lib/python3/dist-packages/aptdaemon/client.py", line 1570
    async = reply_handler and error_handler

Code: Select all

server@Server:~$ sudo mintsources
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 29, in <module>
    import mintcommon.aptdaemon
  File "/usr/lib/python3/dist-packages/mintcommon/aptdaemon.py", line 9, in <module>
    import aptdaemon.client
  File "/usr/lib/python3/dist-packages/aptdaemon/client.py", line 1570
    async = reply_handler and error_handler
          ^
SyntaxError: invalid syntax
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 154, in apport_excepthook
    os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_lib_linuxmint_mintSources_mintSources.py.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 29, in <module>
    import mintcommon.aptdaemon
  File "/usr/lib/python3/dist-packages/mintcommon/aptdaemon.py", line 9, in <module>
    import aptdaemon.client
  File "/usr/lib/python3/dist-packages/aptdaemon/client.py", line 1570
    async = reply_handler and error_handler
          ^
SyntaxError: invalid syntax

I searched this line

Code: Select all

async = reply_handler and error_handler
and one of the suggestions was to rename async for eg to async_ for every entry in that file. But nothing changed I think this has something to do with python3 and aptdaemon and the versions that I have installed and the version of Mint I am running. In fact I am afraid of trying to update anything related to python and aptdaemon because everything got messed up including apt got broken and couldn't install/upgrade packages with it anymore. Or maybe it happened because I tried removing and reinstalling python. Can't remember. :D Timeshift saved the day.

Avoiding these
Image

Code: Select all

server@Server:~$ sudo apt policy aptdaemon
aptdaemon:
  Installed: 1.1.1+bzr982-0ubuntu19.3
  Candidate: 1.1.1+bzr982-0ubuntu19.5
  Version table:
     1.1.1+bzr982-0ubuntu19.5 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages
 *** 1.1.1+bzr982-0ubuntu19.3 100
        100 /var/lib/dpkg/status
     1.1.1+bzr982-0ubuntu19 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic/main i386 Packages
server@Server:~$ sudo apt policy python3
python3:
  Installed: 3.7.3-1
  Candidate: 3.7.3-1
  Version table:
 *** 3.7.3-1 500
        500 http://ftp.de.debian.org/debian buster/main amd64 Packages
        100 /var/lib/dpkg/status
     3.6.7-1~18.04 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
     3.6.5-3 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
server@Server:~$ 
Currently don't have any broken dependencies . Update Manager and Synaptics Package Manager work fine. Tried reinstalling mintinstall but didn't help.

Code: Select all

System:    Host: Server Kernel: 5.4.0-71-generic x86_64 bits: 64 compiler: gcc v: 7.5.0 
           Desktop: Xfce 4.14.1 tk: Gtk 3.22.30 wm: xfwm4 dm: N/A Distro: Linux Mint 19.3 Tricia 
           base: Ubuntu 18.04 bionic 
Machine:   Type: Desktop Mobo: ASRock model: H370M-ITX/ac serial: <filter> 
           UEFI: American Megatrends v: P4.30 date: 12/18/2019 
CPU:       Topology: Quad Core model: Intel Core i3-8100T bits: 64 type: MCP arch: Kaby Lake 
           rev: B L2 cache: 6144 KiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 24799 
           Speed: 3100 MHz min/max: 800/3100 MHz Core speeds (MHz): 1: 3100 2: 3100 3: 3100 
           4: 3100 
Graphics:  Device-1: Intel 8th Gen Core Processor Gaussian Mixture Model vendor: ASRock 
           driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:3e91 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: llvmpipe (LLVM 10.0.0 256 bits) v: 3.3 Mesa 20.0.8 compat-v: 3.1 
           direct render: Yes 
Audio:     Device-1: Intel Cannon Lake PCH cAVS vendor: ASRock driver: snd_hda_intel v: kernel 
           bus ID: 00:1f.3 chip ID: 8086:a348 
           Sound Server: ALSA v: k5.4.0-71-generic 
Network:   Device-1: Intel Ethernet I219-V vendor: ASRock driver: e1000e v: 3.2.6-k port: efa0 
           bus ID: 00:1f.6 chip ID: 8086:15bc 
           IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           Device-2: Intel I211 Gigabit Network vendor: ASRock driver: igb v: 5.6.0-k port: 4000 
           bus ID: 02:00.0 chip ID: 8086:1539 
           IF: enp2s0 state: down mac: <filter> 
           Device-3: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi v: kernel 
           port: 4000 bus ID: 03:00.0 chip ID: 8086:24fb 
           IF: wlp3s0 state: down mac: <filter> 
Drives:    Local Storage: total: 7.39 TiB used: 5.25 TiB (71.0%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: MZVPV128HDGM-00000 size: 119.24 GiB 
           speed: 31.6 Gb/s lanes: 4 serial: <filter> 
           ID-2: /dev/sda vendor: Western Digital model: WD40EFRX-68N32N0 size: 3.64 TiB 
           speed: 6.0 Gb/s serial: <filter> 
           ID-3: /dev/sdb vendor: Western Digital model: WD40EFRX-68N32N0 size: 3.64 TiB 
           speed: 6.0 Gb/s serial: <filter> 
RAID:      Hardware-1: Intel SATA Controller [RAID mode] driver: ahci v: 3.0 bus ID: 00:17.0 
           chip ID: 8086.2822 
           Device-1: md126 type: mdraid status: active Components: online: sda~c1 sdb~c0 
           Info: raid: raid-0 blocks: 7814032384 report: N/A chunk size: 128k 
           Device-2: md127 type: mdraid status: inactive Components: online: N/A spare: sdb~c0 
           Info: raid: sda[1](S) blocks: 4784 report: N/A chunk size: N/A 
Partition: ID-1: / size: 116.38 GiB used: 68.12 GiB (58.5%) fs: ext4 dev: /dev/nvme0n1p2 
USB:       Hub: 1-0:1 info: Full speed (or root) Hub ports: 16 rev: 2.0 chip ID: 1d6b:0002 
           Device-1: 1-2:2 info: Cyber Power System CP1500 AVR UPS type: HID 
           driver: hid-generic,usbhid rev: 1.1 chip ID: 0764:0501 
           Device-2: 1-14:3 info: Intel type: Bluetooth driver: btusb rev: 2.0 chip ID: 8087:0aa7 
           Hub: 2-0:1 info: Full speed (or root) Hub ports: 8 rev: 3.1 chip ID: 1d6b:0003 
Sensors:   System Temperatures: cpu: 42.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     Active apt repos in: /etc/apt/sources.list 
           1: deb http: //ftp.de.debian.org/debian buster main
           Active apt repos in: /etc/apt/sources.list.d/mkvtoolnix.donwload.list 
           1: deb https: //mkvtoolnix.download/ubuntu/ bionic main
           2: deb-src https: //mkvtoolnix.download/ubuntu/ bionic main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http: //packages.linuxmint.com tricia main upstream import backport #id:linuxmint_main
           2: deb http: //archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
           3: deb http: //archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse
           4: deb http: //archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
           5: deb http: //security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
           6: deb http: //archive.canonical.com/ubuntu/ bionic partner
           Active apt repos in: /etc/apt/sources.list.d/plexmediaserver.list 
           1: deb https: //downloads.plex.tv/repo/deb/ public main
           Active apt repos in: /etc/apt/sources.list.d/ubuntuhandbook1-apps-bionic.list 
           1: deb http: //ppa.launchpad.net/ubuntuhandbook1/apps/ubuntu bionic main
Info:      Processes: 232 Uptime: 1d 2h 18m Memory: 7.45 GiB used: 2.11 GiB (28.3%) Init: systemd 
           v: 241 runlevel: 5 Compilers: gcc: 8.4.0 alt: 7/8 Client: Unknown python3.7 client 
           inxi: 3.0.32 
Thanks for the help!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

Re: Software Manager doesn't Open

Post by deepakdeshp »

Try

Code: Select all

 sudo apt update; sudo apt install mintinstall 
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
mikeflan
Level 17
Level 17
Posts: 7155
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Software Manager doesn't Open

Post by mikeflan »

sudo mintinstall
Please do as deepakdeshp recommends. Then don't use sudo to run mintinstall. Just type:

Code: Select all

mintinstall
When I type sudo mintinstall I get:

Code: Select all

sudo mintinstall
[sudo] password for mike:     
The software manager should not be run as root. Please run it in user mode.
MaCK0y
Level 1
Level 1
Posts: 6
Joined: Fri Apr 16, 2021 6:33 am

Re: Software Manager doesn't Open

Post by MaCK0y »

I already tried uninstalling and reinstalling mintinstall. I don't think it's mintinstall or mintupdate that is the problem but I think something to do with python3 but have no idea how to fix it. Running mintinstall without sudo produces the same errors.
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

Re: Software Manager doesn't Open

Post by deepakdeshp »

If you have uninstalled Python 3 you have to reinstall it.if that doesn't solve it, go back to TimeShift backup or Clonezilla backup by restoration, if you have the backups.

Also check your disk.https://help.ubuntu.com/community/Smartmontools Was there unplanned shutdown where some inodes were cleared by fsck ?
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
mikeflan
Level 17
Level 17
Posts: 7155
Joined: Sun Apr 26, 2020 9:28 am
Location: Houston, TX

Re: Software Manager doesn't Open

Post by mikeflan »

Try reinstalling Python3 first. Then if you are desperate try this.
Backup/var/lib/apt/lists/:

Code: Select all

sudo cp /var/lib/apt/lists/* somebackupdirectory
Remove all apt lists:

Code: Select all

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

Code: Select all

apt-get update

Code: Select all

apt-get upgrade
Warning: This may be bad advice.
MaCK0y
Level 1
Level 1
Posts: 6
Joined: Fri Apr 16, 2021 6:33 am

Re: Software Manager doesn't Open

Post by MaCK0y »

Phython3 is installed. I tried again to do those python and aptdaemon updates from the Update Manager and this is what I get.

Code: Select all

Unpacking python3-aptdaemon (1.1.1+bzr982-0ubuntu19.5) over (1.1.1+bzr982-0ubuntu19.3) ...
Setting up python3-aptdaemon (1.1.1+bzr982-0ubuntu19.5) ...
  File "/usr/lib/python3/dist-packages/aptdaemon/client.py", line 1570
    async = reply_handler and error_handler
          ^
SyntaxError: invalid syntax

dpkg: error processing package python3-aptdaemon (--configure):
 installed python3-aptdaemon package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 python3-aptdaemon
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up libpython3.7:amd64 (3.7.5-2~18.04.4) ...
Setting up python3-aptdaemon (1.1.1+bzr982-0ubuntu19.5) ...
  File "/usr/lib/python3/dist-packages/aptdaemon/client.py", line 1570
    async = reply_handler and error_handler
          ^
SyntaxError: invalid syntax

dpkg: error processing package python3-aptdaemon (--configure):
 installed python3-aptdaemon package post-installation script subprocess returned error exit status 1
Setting up libpython2.7-minimal:amd64 (2.7.17-1~18.04ubuntu1.6) ...
Setting up python2.7-minimal (2.7.17-1~18.04ubuntu1.6) ...
Setting up libpython3.6-minimal:amd64 (3.6.9-1~18.04ubuntu1.4) ...
Setting up python3.6-minimal (3.6.9-1~18.04ubuntu1.4) ...
Setting up libpython3.6-stdlib:amd64 (3.6.9-1~18.04ubuntu1.4) ...
Setting up python3.6 (3.6.9-1~18.04ubuntu1.4) ...
Setting up libpython3.6:amd64 (3.6.9-1~18.04ubuntu1.4) ...
Setting up libpython2.7-stdlib:amd64 (2.7.17-1~18.04ubuntu1.6) ...
Setting up libpython2.7:amd64 (2.7.17-1~18.04ubuntu1.6) ...
Setting up python2.7 (2.7.17-1~18.04ubuntu1.6) ...
Processing triggers for libc-bin (2.28-10) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for desktop-file-utils (0.23+linuxmint8) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.31.4-3) ...
Errors were encountered while processing:
 python3-aptdaemon
This async = reply_handler and error_handler error is probably the key to solve this. The python updates get installed but not the aptdaemon. After the updates, I have broken dependencies

Code: Select all

sudo apt-get check
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 aptdaemon : Depends: python3-aptdaemon (= 1.1.1+bzr982-0ubuntu19.3) but 1.1.1+bzr982-0ubuntu19.5 is installed
 python3-aptdaemon.gtk3widgets : Depends: python3-aptdaemon (= 1.1.1+bzr982-0ubuntu19.3) but 1.1.1+bzr982-0ubuntu19.5 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
The command apt --fix-broken install doesn't work or maybe I'm doing it wrong. Then I tried the following:

Code: Select all

sudo apt reinstall python3-aptdaemon.gtk3widgets
The following packages will be REINSTALLED:
  python3-aptdaemon.gtk3widgets{b} 
The following partially installed packages will be configured:
  python3-aptdaemon 
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 150 not upgraded.
E: Can't find a source to download version '1.1.1+bzr982-0ubuntu19.3' of 'python3-aptdaemon.gtk3widgets:amd64'
After unpacking 0 B will be used.
The following packages have unmet dependencies:
 python3-aptdaemon.gtk3widgets : Depends: python3-aptdaemon (= 1.1.1+bzr982-0ubuntu19.3) but 1.1.1+bzr982-0ubuntu19.5 is installed
 aptdaemon : Depends: python3-aptdaemon (= 1.1.1+bzr982-0ubuntu19.3) but 1.1.1+bzr982-0ubuntu19.5 is installed
The following actions will resolve these dependencies:

     Upgrade the following packages:                                                                                               
1)     aptdaemon [1.1.1+bzr982-0ubuntu19.3 (now) -> 1.1.1+bzr982-0ubuntu19.5 (bionic-security, bionic-updates)]                    
2)     python3-aptdaemon.gtk3widgets [1.1.1+bzr982-0ubuntu19.3 (now) -> 1.1.1+bzr982-0ubuntu19.5 (bionic-security, bionic-updates)]



Accept this solution? [Y/n/q/?] Y
The following packages will be upgraded:
  aptdaemon python3-aptdaemon.gtk3widgets 
The following partially installed packages will be configured:
  python3-aptdaemon 
2 packages upgraded, 0 newly installed, 0 to remove and 149 not upgraded.
Need to get 0 B/27.6 kB of archives. After unpacking 0 B will be used.
Do you want to continue? [Y/n/?] Y
Setting up python3-aptdaemon (1.1.1+bzr982-0ubuntu19.5) ...
  File "/usr/lib/python3/dist-packages/aptdaemon/client.py", line 1570
    async = reply_handler and error_handler
          ^
SyntaxError: invalid syntax

dpkg: error processing package python3-aptdaemon (--configure):
 installed python3-aptdaemon package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 python3-aptdaemon
E: Sub-process /usr/bin/dpkg returned an error code (1)
Setting up python3-aptdaemon (1.1.1+bzr982-0ubuntu19.5) ...
  File "/usr/lib/python3/dist-packages/aptdaemon/client.py", line 1570
    async = reply_handler and error_handler
          ^
SyntaxError: invalid syntax

dpkg: error processing package python3-aptdaemon (--configure):
 installed python3-aptdaemon package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 python3-aptdaemon
MaCK0y
Level 1
Level 1
Posts: 6
Joined: Fri Apr 16, 2021 6:33 am

Re: Software Manager doesn't Open

Post by MaCK0y »

Nevermind. Solved it. Thanks to https://linuxmint.com.ru/viewtopic.php?t=4617. Ran the follow command and fixed it. Probably missed a few when I tried to do it manually. :)

Code: Select all

sudo sed -i 's/async/async_/g' /usr/lib/python3/dist-packages/aptdaemon/client.py
The aptdaemon update still doesn't work and breaks software Center so it's going to the blacklist.

Edit: When I try to install something from Software Manager it complains about aptdaemon. I think I'm done with Software Manager.
Locked

Return to “Software & Applications”