Cannot update due to Python package error <Solved>

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
AquaticDwarf
Level 1
Level 1
Posts: 9
Joined: Fri Nov 25, 2022 5:22 pm

Cannot update due to Python package error <Solved>

Post by AquaticDwarf »

I was attempting to use the automatic update manager, however after loading some files, it returns this error

Code: Select all

E: python3: installed python3 package post-installation script subprocess returned error exit status 4
and doesn't appear to have downloaded any of the updates.
I am using Linux Mint x86_64bit Cinnamon 5.4.11 and have tried running the command

Code: Select all

sudo apt-get update && sudo apt-get upgrade && sudo apt-get autoremove
to resolve the issue, but that seems to result in a different error

Code: Select all

W: GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
Which does not seem to be resolved by adding

Code: Select all

--allow-unauthenticated
any alternative paths toward resolving these issues would be appreciated.
Last edited by LockBot on Thu May 25, 2023 10:00 pm, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
karlchen
Level 23
Level 23
Posts: 18239
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Cannot update due to Python package error

Post by karlchen »

Hello, AquaticDwarf.

Please, share your Linux Mint System Information with us.
The steps how to do so can be found e.g. in the post over there: viewtopic.php?f=90&t=318644

Next, please, execute the terminal command sudo apt update and share the complete text output, which it will display in the terminal window.

Finally, execute the terminal command sudo apt upgrade and share the complete text output, which it will display in the terminal window.

Regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
AquaticDwarf
Level 1
Level 1
Posts: 9
Joined: Fri Nov 25, 2022 5:22 pm

Re: Cannot update due to Python package error

Post by AquaticDwarf »

Complete System information

Code: Select all

System:
  Kernel: 5.15.0-47-generic x86_64 bits: 64 compiler: gcc v: 11.2.0 Desktop: Cinnamon 5.4.11
    tk: GTK 3.24.33 wm: Mutter dm: LightDM Distro: Linux Mint 21 Vanessa base: Ubuntu 22.04 jammy
Machine:
  Type: Desktop Mobo: ASUSTeK model: ROG STRIX B450-F GAMING II v: Rev 1.xx
    serial: <superuser required> UEFI: American Megatrends v: 4204 date: 01/28/2021
Battery:
  Device-1: hidpp_battery_0 model: Logitech MX Ergo Multi-Device Trackball serial: <filter>
    charge: 55% (should be ignored) status: Discharging
CPU:
  Info: 6-core model: AMD Ryzen 5 5600X bits: 64 type: MT MCP arch: Zen 3 rev: 0 cache:
    L1: 384 KiB L2: 3 MiB L3: 32 MiB
  Speed (MHz): avg: 3015 high: 3600 min/max: 2200/4650 boost: disabled cores: 1: 3005 2: 2959
    3: 3439 4: 2887 5: 2892 6: 2886 7: 3600 8: 2884 9: 2883 10: 2886 11: 2958 12: 2902
    bogomips: 88804
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: NVIDIA GP106 [GeForce GTX 1060 3GB] vendor: PNY driver: nvidia v: 515.65.01 pcie:
    speed: 2.5 GT/s lanes: 16 ports: active: none off: HDMI-A-1 empty: DP-1, DP-2, DP-3, DVI-D-1
    bus-ID: 09:00.0 chip-ID: 10de:1c02
  Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: nvidia gpu: nvidia display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 92
  Monitor-1: HDMI-0 res: 1920x1080 dpi: 93 diag: 604mm (23.8")
  OpenGL: renderer: NVIDIA GeForce GTX 1060 3GB/PCIe/SSE2 v: 4.6.0 NVIDIA 515.65.01
    direct render: Yes
Audio:
  Device-1: Creative Labs Sound Core3D [Sound Blaster Recon3D / Z-Series] driver: snd_hda_intel
    v: kernel pcie: speed: 2.5 GT/s lanes: 1 bus-ID: 06:00.0 chip-ID: 1102:0012
  Device-2: NVIDIA GP106 High Definition Audio vendor: PNY driver: snd_hda_intel v: kernel pcie:
    speed: 8 GT/s lanes: 16 bus-ID: 09:00.1 chip-ID: 10de:10f1
  Device-3: AMD Starship/Matisse HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel pcie:
    speed: 16 GT/s lanes: 16 bus-ID: 0b:00.4 chip-ID: 1022:1487
  Device-4: JMTek LLC. USB PnP Audio Device type: USB driver: hid-generic,snd-usb-audio,usbhid
    bus-ID: 3-2:3 chip-ID: 0c76:161e
  Sound Server-1: ALSA v: k5.15.0-47-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: e000 bus-ID: 03:00.0 chip-ID: 8086:1539
  IF: enp3s0 state: down mac: <filter>
  Device-2: Linksys WUSB54GC v1 802.11g Adapter [Ralink RT73] type: USB driver: rt73usb
    bus-ID: 1-2:2 chip-ID: 13b1:0020
  IF: wlx0018f83531a9 state: up mac: <filter>
Drives:
  Local Storage: total: 1.82 TiB used: 393.41 GiB (21.1%)
  ID-1: /dev/sda vendor: Seagate model: ST2000DM008-2FR102 size: 1.82 TiB speed: 6.0 Gb/s
    serial: <filter>
Partition:
  ID-1: / size: 1.79 TiB used: 393.4 GiB (21.5%) fs: ext4 dev: /dev/sda2
  ID-2: /boot/efi size: 511 MiB used: 5.2 MiB (1.0%) fs: vfat dev: /dev/sda1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 898.3 MiB (43.9%) priority: -2 file: /swapfile
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 10 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002
  Device-1: 1-2:2 info: Linksys WUSB54GC v1 802.11g Adapter [Ralink RT73] type: Network
    driver: rt73usb rev: 2.0 speed: 480 Mb/s chip-ID: 13b1:0020
  Device-2: 1-4:3 info: Logitech Unifying Receiver type: Keyboard,Mouse,HID
    driver: logitech-djreceiver,usbhid rev: 2.0 speed: 12 Mb/s chip-ID: 046d:c52b
  Device-3: 1-8:4 info: ASUSTek AURA MOTHERBOARD type: HID driver: hid-generic,usbhid rev: 2.0
    speed: 12 Mb/s chip-ID: 0b05:18a3
  Hub-2: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002
  Device-1: 3-1:2 info: Logitech Gaming Keyboard G213 type: Keyboard,HID
    driver: hid-generic,usbhid rev: 2.0 speed: 12 Mb/s chip-ID: 046d:c336
  Device-2: 3-2:3 info: JMTek LLC. USB PnP Audio Device type: Audio,HID
    driver: hid-generic,snd-usb-audio,usbhid rev: 1.1 speed: 12 Mb/s chip-ID: 0c76:161e
  Hub-4: 4-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 31 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 30%
Repos:
  Packages: 2482 apt: 2472 flatpak: 10
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https: //dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
    1: deb http: //packages.linuxmint.com vanessa main upstream import backport
    2: deb http: //archive.ubuntu.com/ubuntu jammy main restricted universe multiverse
    3: deb http: //archive.ubuntu.com/ubuntu jammy-updates main restricted universe multiverse
    4: deb http: //archive.ubuntu.com/ubuntu jammy-backports main restricted universe multiverse
    5: deb http: //security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
  Active apt repos in: /etc/apt/sources.list.d/oibaf-graphics-drivers-jammy.list
    1: deb http: //ppa.launchpad.net/oibaf/graphics-drivers/ubuntu jammy main
  Active apt repos in: /etc/apt/sources.list.d/steam.list
    1: deb [arch=amd64,i386] https: //repo.steampowered.com/steam/ stable steam
    2: deb-src [arch=amd64,i386] https: //repo.steampowered.com/steam/ stable steam
  Active apt repos in: /etc/apt/sources.list.d/winehq-bionic.sources
    1: deb [arch=amd64 i386] https: //dl.winehq.org/wine-builds/ubuntu bionic main
  Active apt repos in: /etc/apt/sources.list.d/winehq-focal.sources
    1: deb [arch=amd64 i386] https: //dl.winehq.org/wine-builds/ubuntu focal main
  Active apt repos in: /etc/apt/sources.list.d/winehq-jammy.sources
    1: deb [arch=amd64 i386] https: //dl.winehq.org/wine-builds/ubuntu jammy main
Info:
  Processes: 365 Uptime: 4d 21h 26m Memory: 15.52 GiB used: 3.95 GiB (25.4%) Init: systemd v: 249
  runlevel: 5 Compilers: gcc: 11.2.0 alt: 11 Client: Unknown python3.10 client inxi: 3.3.13
The complete output for sudo apt update

Code: Select all

Hit:1 https://repo.steampowered.com/steam stable InRelease                     
Get:2 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease [6,263 B]      
Err:2 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease                
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
Hit:3 https://dl.winehq.org/wine-builds/ubuntu focal InRelease                 
Hit:4 https://dl.winehq.org/wine-builds/ubuntu jammy InRelease                 
Get:5 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]      
Hit:6 https://dl.google.com/linux/chrome/deb stable InRelease                  
Hit:7 http://archive.ubuntu.com/ubuntu jammy InRelease                         
Ign:8 http://packages.linuxmint.com vanessa InRelease                          
Get:9 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB]        
Hit:10 http://packages.linuxmint.com vanessa Release                           
Hit:12 http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu jammy InRelease  
Get:13 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]    
Reading package lists... Done                                                  
W: GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
User avatar
karlchen
Level 23
Level 23
Posts: 18239
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Cannot update due to Python package error

Post by karlchen »

Hello AquaticDwarf.

You are using Mint 21. It is based on Ubuntu 22.04 jammy.

Your sources list files, however, hold references to 2 older Ubuntu versions for Wine, to focal and to bionic.
Use Software Sources and remove those

Code: Select all

  Active apt repos in: /etc/apt/sources.list.d/winehq-bionic.sources
    1: deb [arch=amd64 i386] https: //dl.winehq.org/wine-builds/ubuntu bionic main
  Active apt repos in: /etc/apt/sources.list.d/winehq-focal.sources
    1: deb [arch=amd64 i386] https: //dl.winehq.org/wine-builds/ubuntu focal main
Keep only the Wine repository entry for Ubuntu 22.04 jammy.

Code: Select all

Active apt repos in: /etc/apt/sources.list.d/winehq-jammy.sources
    1: deb [arch=amd64 i386] https: //dl.winehq.org/wine-builds/ubuntu jammy main
Execute sudo apt update again and share the terminal output again, please.

Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
User avatar
karlchen
Level 23
Level 23
Posts: 18239
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Cannot update due to Python package error

Post by karlchen »

Hello, AquaticDwarf.

Your software sources also list a PPA named oibaf.

Code: Select all

  Active apt repos in: /etc/apt/sources.list.d/oibaf-graphics-drivers-jammy.list
    1: deb http: //ppa.launchpad.net/oibaf/graphics-drivers/ubuntu jammy main
While oibaf may be helpful in resolving cases, where your brand new hardware needs more recent graphic driver software than available from the default software repositories, the drivers from the same PPA may also cause new trouble, because driver software is updated in really short intervals.
Thus you are running a high rist that the drivers, which you received from oibaf and which fixed a problem yesterday, may be the source of trouble a few days later, because they have been updated to again.
Your decision to run this risk or to disable the oibaf PPA, thus avoiding constant updates of graphic driver software in short intervals.

Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
User avatar
karlchen
Level 23
Level 23
Posts: 18239
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Cannot update due to Python package error

Post by karlchen »

Hello, AquaticDwarf.

About the (last) warning, displayed by "sudo apt update":

Code: Select all

W: http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details
In case you do not wish to ignore the warning, but to get rid of it, in this case you may be interested in this article:
apt-key Is Deprecated. How To Add OpenPGP Repository Signing Keys Without It On Debian, Ubuntu, Linux Mint, Pop!_OS, Etc.
(Hopefully future Ubuntu releases will bring along either a fixed apt-key command or an appropriate replacement, which will spare the users the hassle of adding Signing Keys manually in the now recommended way.)

Final comment from my side:

Once you have fixed the issues explained in the 2 posts above, please, re-run sudo apt update and share its complete output again.

You may also execute sudo apt upgrade and share that complete output as well.

Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
AquaticDwarf
Level 1
Level 1
Posts: 9
Joined: Fri Nov 25, 2022 5:22 pm

Re: Cannot update due to Python package error

Post by AquaticDwarf »

I hate to add further complication to this problem, but I do not see any place where to remove the older Wine versions or any alternative to the PPA oibaf listed within my Software sources.
User avatar
karlchen
Level 23
Level 23
Posts: 18239
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Cannot update due to Python package error

Post by karlchen »

AquaticDwarf wrote: Fri Nov 25, 2022 10:47 pm I hate to add further complication to this problem, but I do not see any place where to remove the older Wine versions or any alternative to the PPA oibaf listed within my Software sources.
Excluding the oibaf PPA for the moment, removing the obsolete WineHQ repository entries, which applied to Ubuntu 18.04 bionic (Mint 19.x) and to Ubuntu 20.04 focal (Mint 20.x), is easy:

First way:
Either
You start the application Software Sources from the Linux Mint application menu. You locate the 2 obsolete repositories and disable them (or you delete them). You keep the WineHQ entry for Ubuntu 22.04 jammy (Mint 21), however.
or
Second way:
(And this on is even easier) In a terminal window you execute the 2 commands:

Code: Select all

sudo rm /etc/apt/sources.list.d/winehq-bionic.sources
sudo rm /etc/apt/sources.list.d/winehq-focal.sources
This removes the 2 no longer needed WineHQ software sources from the list of your software sources.
Next you execute

Code: Select all

sudo apt update
and share the text output, which it will display in the terminal window, with us, please.
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Olaf2020

Re: Cannot update due to Python package error

Post by Olaf2020 »

Code: Select all

sudo rm /etc/apt/sources.list.d/winehq-bionic*

Code: Select all

sudo rm /etc/apt/sources.list.d/winehq-focal*

Code: Select all

cd /etc/apt && sudo cp trusted.gpg trusted.gpg.d

Code: Select all

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 76F1A20FF987672F

Code: Select all

sudo apt update
AquaticDwarf
Level 1
Level 1
Posts: 9
Joined: Fri Nov 25, 2022 5:22 pm

Re: Cannot update due to Python package error

Post by AquaticDwarf »

I removed them via the additional Wine repositories via the terminal and followed the advice of Olaf as well and got this as a result

Code: Select all

Ign:1 http://packages.linuxmint.com vanessa InRelease
Hit:2 http://packages.linuxmint.com vanessa Release                            
Hit:3 http://archive.ubuntu.com/ubuntu jammy InRelease                         
Hit:4 https://repo.steampowered.com/steam stable InRelease                     
Hit:6 http://archive.ubuntu.com/ubuntu jammy-updates InRelease                 
Hit:7 https://dl.google.com/linux/chrome/deb stable InRelease                  
Get:8 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]      
Hit:9 http://archive.ubuntu.com/ubuntu jammy-backports InRelease               
Hit:10 https://dl.winehq.org/wine-builds/ubuntu jammy InRelease                
Hit:11 http://ppa.launchpad.net/oibaf/graphics-drivers/ubuntu jammy InRelease  
Get:12 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [20.0 kB]
Get:13 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [13.3 kB]
Fetched 144 kB in 1s (135 kB/s)             
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
303 packages can be upgraded. Run 'apt list --upgradable' to see them.
Olaf2020

Re: Cannot update due to Python package error

Post by Olaf2020 »

Code: Select all

sudo apt dist-upgrade
AquaticDwarf
Level 1
Level 1
Posts: 9
Joined: Fri Nov 25, 2022 5:22 pm

Re: Cannot update due to Python package error

Post by AquaticDwarf »

Code: Select all

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libllvm13:i386
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  libllvm15 libllvm15:i386 libnm0:i386 libva-drm2:i386 libva-glx2
  libva-glx2:i386 libva-x11-2:i386 linux-headers-5.15.0-53
  linux-headers-5.15.0-53-generic linux-image-5.15.0-53-generic
  linux-modules-5.15.0-53-generic linux-modules-extra-5.15.0-53-generic
  systemd-hwe-hwdb
The following packages will be upgraded:
  alsa-ucm-conf apt apt-utils bind9-dnsutils bind9-host bind9-libs binutils
  binutils-common binutils-x86-64-linux-gnu blueman bulky casper cinnamon
  cinnamon-common cinnamon-control-center cinnamon-control-center-data
  cinnamon-control-center-dbg cinnamon-dbg cpp-11 curl dbus dbus-user-session
  dbus-x11 distro-info-data dmidecode evolution-data-server
  evolution-data-server-common firefox firefox-locale-en firmware-sof-signed
  fonts-opensymbol fwupd gcc-11 gcc-11-base gdb gdbserver ghostscript
  ghostscript-x gir1.2-camel-1.2 gir1.2-ecal-2.0 gir1.2-edataserver-1.2
  gir1.2-gdkpixbuf-2.0 gir1.2-gnomedesktop-3.0 gir1.2-javascriptcoregtk-4.0
  gir1.2-meta-muffin-0.0 gir1.2-webkit2-4.0 gir1.2-xapp-1.0
  gnome-desktop3-data google-chrome-stable grub-efi-amd64-bin
  grub-efi-amd64-signed gstreamer1.0-pipewire gzip intel-microcode
  isc-dhcp-client isc-dhcp-common kpartx kpartx-boot libapt-pkg6.0 libasan6
  libbinutils libcamel-1.2-63 libcinnamon-control-center1 libctf-nobfd0
  libctf0 libcurl3-gnutls libcurl4 libcurl4:i386 libdbus-1-3 libdbus-1-3:i386
  libdrm-amdgpu1 libdrm-amdgpu1:i386 libdrm-common libdrm-intel1
  libdrm-intel1:i386 libdrm-nouveau2 libdrm-nouveau2:i386 libdrm-radeon1
  libdrm-radeon1:i386 libdrm2 libdrm2:i386 libebackend-1.2-10 libebook-1.2-20
  libebook-contacts-1.2-3 libecal-2.0-1 libedata-book-1.2-26
  libedata-cal-2.0-1 libedataserver-1.2-26 libedataserverui-1.2-3 libegl-mesa0
  libegl-mesa0:i386 libexpat1 libexpat1:i386 libflac8 libflac8:i386
  libfprint-2-2 libfwupd2 libfwupdplugin5 libgbm1 libgbm1:i386 libgcc-11-dev
  libgdk-pixbuf-2.0-0 libgdk-pixbuf-2.0-0:i386 libgdk-pixbuf2.0-bin
  libgdk-pixbuf2.0-common libgl1-mesa-dri:i386 libgl1-mesa-dri
  libglapi-mesa:i386 libglapi-mesa libglx-mesa0 libglx-mesa0:i386
  libgnome-desktop-3-19 libgs9 libgs9-common libjavascriptcoregtk-4.0-18
  libjbig0 libjbig0:i386 libksba8 liblibreoffice-java libmuffin0 libnetplan0
  libnss-myhostname libnss-systemd libntfs-3g89 libnvidia-cfg1-515
  libnvidia-common-515 libnvidia-compute-515 libnvidia-compute-515:i386
  libnvidia-decode-515 libnvidia-decode-515:i386 libnvidia-encode-515
  libnvidia-encode-515:i386 libnvidia-extra-515 libnvidia-fbc1-515
  libnvidia-fbc1-515:i386 libnvidia-gl-515 libnvidia-gl-515:i386 libosmesa6
  libosmesa6:i386 libpam-systemd libpcre2-16-0 libpcre2-32-0 libpcre2-8-0
  libpcre2-8-0:i386 libperl5.34 libpipewire-0.3-0 libpipewire-0.3-modules
  libpixman-1-0 libpixman-1-0:i386 libpulse-mainloop-glib0 libpulse0
  libpulse0:i386 libpulsedsp libqt5concurrent5 libqt5core5a libqt5dbus5
  libqt5gui5 libqt5network5 libqt5sql5 libqt5sql5-sqlite libqt5widgets5
  libqt5xml5 libreoffice-base libreoffice-base-core libreoffice-base-drivers
  libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw
  libreoffice-gnome libreoffice-gtk3 libreoffice-help-common
  libreoffice-help-de libreoffice-help-en-gb libreoffice-help-en-us
  libreoffice-help-es libreoffice-help-fr libreoffice-help-it
  libreoffice-help-pt libreoffice-help-pt-br libreoffice-help-ru
  libreoffice-help-zh-cn libreoffice-help-zh-tw libreoffice-impress
  libreoffice-java-common libreoffice-l10n-de libreoffice-l10n-en-gb
  libreoffice-l10n-en-za libreoffice-l10n-es libreoffice-l10n-fr
  libreoffice-l10n-it libreoffice-l10n-pt libreoffice-l10n-pt-br
  libreoffice-l10n-ru libreoffice-l10n-zh-cn libreoffice-l10n-zh-tw
  libreoffice-math libreoffice-sdbc-hsqldb libreoffice-style-colibre
  libreoffice-writer libspa-0.2-modules libspeechd2 libsqlite3-0:i386
  libsqlite3-0 libsystemd0 libsystemd0:i386 libtiff5 libtiff5:i386 libtsan0
  libudev1 libudev1:i386 libuno-cppu3 libuno-cppuhelpergcc3-3
  libuno-purpenvhelpergcc3-3 libuno-sal3 libuno-salhelpergcc3-3
  libunoloader-java libvdpau1 libwayland-client0 libwayland-client0:i386
  libwayland-cursor0 libwayland-cursor0:i386 libwayland-egl1
  libwayland-egl1:i386 libwayland-server0 libwayland-server0:i386
  libwebkit2gtk-4.0-37 libxatracker2 linux-firmware linux-generic
  linux-headers-generic linux-image-generic linux-libc-dev mesa-va-drivers
  mesa-va-drivers:i386 mesa-vdpau-drivers mesa-vulkan-drivers
  mesa-vulkan-drivers:i386 mintreport muffin muffin-common muffin-dbg
  netplan.io ntfs-3g nvidia-compute-utils-515 nvidia-dkms-515
  nvidia-driver-515 nvidia-kernel-common-515 nvidia-kernel-source-515
  nvidia-utils-515 openjdk-11-jre openjdk-11-jre-headless openssl openvpn perl
  perl-base perl-modules-5.34 pipewire pipewire-bin pulseaudio
  pulseaudio-module-bluetooth pulseaudio-utils python3-apport python3-gdbm
  python3-mako python3-oauthlib python3-problem-report python3-speechd
  python3-uno qt5-gtk-platformtheme rsync speech-dispatcher-audio-plugins
  steam-launcher steam-libs-amd64 steam-libs-i386:i386 sudo synaptic systemd
  systemd-coredump systemd-sysv systemd-timesyncd thunderbird
  thunderbird-gnome-support thunderbird-locale-en thunderbird-locale-en-us
  tzdata udev uno-libs-private unzip ure ure-java vim-common vim-tiny
  warpinator webapp-manager xserver-common xserver-xephyr xserver-xorg-core
  xserver-xorg-legacy xserver-xorg-video-amdgpu xserver-xorg-video-nvidia-515
  xwayland xxd
303 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/1,419 MB of archives.
After this operation, 928 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Extracting templates from packages: 100%
Preconfiguring packages ...
setting xserver-xorg-legacy/xwrapper/allowed_users from configuration file
Setting up python3 (3.10.6-1~22.04) ...
running python rtupdate hooks for python3.10...
  File "/usr/share/games/renpy/launcher/game/gui7/code.py", line 283
    l = re.sub(ur'_\((\".*?\")\)', replace, l)
                 ^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax
error running python rtupdate hook renpy
dpkg: error processing package python3 (--configure):
 installed python3 package post-installation script subprocess returned error ex
it status 4
Errors were encountered while processing:
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)
Olaf2020

Re: Cannot update due to Python package error

Post by Olaf2020 »

Code: Select all

sudo rm /var/lib/dpkg/info/python3.postinst

Code: Select all

sudo apt clean

Code: Select all

sudo apt install --reinstall python3

Code: Select all

sudo apt install -f
AquaticDwarf
Level 1
Level 1
Posts: 9
Joined: Fri Nov 25, 2022 5:22 pm

Re: Cannot update due to Python package error

Post by AquaticDwarf »

Code: Select all

sudo rm /var/lib/dpkg/info/python3.postinst
rm: cannot remove '/var/lib/dpkg/info/python3.postinst': No such file or directory

Code: Select all

sudo apt clean

Code: Select all

sudo apt install --reinstall python3
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 303 not upgraded.
1 not fully installed or removed.
Need to get 22.8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3 amd64 3.10.6-1~22.04 [22.8 kB]
Fetched 22.8 kB in 1s (24.0 kB/s)
(Reading database ... 330083 files and directories currently installed.)
Preparing to unpack .../python3_3.10.6-1~22.04_amd64.deb ...
running python pre-rtupdate hooks for python3.10...
Unpacking python3 (3.10.6-1~22.04) over (3.10.6-1~22.04) ...
Setting up python3 (3.10.6-1~22.04) ...
running python rtupdate hooks for python3.10...
  File "/usr/share/games/renpy/launcher/game/gui7/code.py", line 283
    l = re.sub(ur'_\((\".*?\")\)', replace, l)
                 ^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax
error running python rtupdate hook renpy
dpkg: error processing package python3 (--configure):
 installed python3 package post-installation script subprocess returned error ex
it status 4
Errors were encountered while processing:
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)

Code: Select all

deven@deven-System-Product-Name:~$ sudo apt install -f
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 303 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3 (3.10.6-1~22.04) ...
running python rtupdate hooks for python3.10...
  File "/usr/share/games/renpy/launcher/game/gui7/code.py", line 283
    l = re.sub(ur'_\((\".*?\")\)', replace, l)
                 ^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax
error running python rtupdate hook renpy
dpkg: error processing package python3 (--configure):
 installed python3 package post-installation script subprocess returned error ex
it status 4
Errors were encountered while processing:
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)
Last edited by karlchen on Sun Nov 27, 2022 11:47 am, edited 1 time in total.
Reason: structured the post by enclosing each terminal command plus its screen output in a pair of [code] [/code] tags
Olaf2020

Re: Cannot update due to Python package error

Post by Olaf2020 »

I have no other ideas
User avatar
spamegg
Level 14
Level 14
Posts: 5117
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Cannot update due to Python package error

Post by spamegg »

Olaf2020 wrote: Sun Nov 27, 2022 8:59 am I have no other ideas
Probably something like apt remove renpy then try again?
AquaticDwarf
Level 1
Level 1
Posts: 9
Joined: Fri Nov 25, 2022 5:22 pm

Re: Cannot update due to Python package error

Post by AquaticDwarf »

spamegg wrote: Sat Dec 03, 2022 3:45 am
Olaf2020 wrote: Sun Nov 27, 2022 8:59 am I have no other ideas
Probably something like apt remove renpy then try again?
I ran
apt remove renpy
like Spamegg suggested and then re-ran the lines of codes Olaf had suggested
sudo rm /var/lib/dpkg/info/python3.postinst
sudo apt clean
sudo apt install --reinstall python3
sudo apt install -f
and it seems to have worked. I can now install updates like normal.
Thanks for your help Spamegg, Olaf2020 and Karlchen!
Locked

Return to “Software & Applications”