Cannot upgrade
#1
Sorry if the answer is obvious, but I am new to Deb/Mobian.



Code:
$ cat sources.list
deb http://deb.debian.org/debian bullseye main contrib
$ cat sources.list.d/mobian.list
deb http://repo.mobian-project.org/ bullseye main non-free

$ sudo apt update
Hit:1 http://repo.mobian-project.org bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.


However if I now try to upgrade I get the following list of errors:



Code:
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  locales-all python3-dateutil python3-pil python3-pil.imagetk
4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
32 not fully installed or removed.
Need to get 11.4 MB of archives.
After this operation, 14.3 kB disk space will be freed.
Do you want to continue? [Y/n]
Get:1 http://deb.debian.org/debian bullseye/main arm64 python3-dateutil all 2.8.1-6 [79.2 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 python3-pil.imagetk arm64 8.1.2+dfsg-0.3 [74.8 kB]
Get:3 http://deb.debian.org/debian bullseye/main arm64 python3-pil arm64 8.1.2+dfsg-0.3 [428 kB]
Get:4 http://deb.debian.org/debian bullseye/main arm64 locales-all arm64 2.31-13 [10.8 MB]
Fetched 11.4 MB in 8s (1,413 kB/s)                                                                                                
(Reading database ... 118132 files and directories currently installed.)
Preparing to unpack .../python3-dateutil_2.8.1-6_all.deb ...
Traceback (most recent call last):
  File "/usr/lib/python3.9/subprocess.py", line 73, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/py3clean", line 32, in <module>
    from debpython import files as dpf
  File "/usr/share/python3/debpython/__init__.py", line 7, in <module>
    from subprocess import PIPE, Popen
  File "/usr/lib/python3.9/subprocess.py", line 80, in <module>
    import selectors
ModuleNotFoundError: No module named 'selectors'
dpkg: warning: old python3-dateutil package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/lib/python3.9/subprocess.py", line 73, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/py3clean", line 32, in <module>
    from debpython import files as dpf
  File "/usr/share/python3/debpython/__init__.py", line 7, in <module>
    from subprocess import PIPE, Popen
  File "/usr/lib/python3.9/subprocess.py", line 80, in <module>
    import selectors
ModuleNotFoundError: No module named 'selectors'
dpkg: error processing archive /var/cache/apt/archives/python3-dateutil_2.8.1-6_all.deb (--unpack):
new python3-dateutil package pre-removal script subprocess returned error exit status 1
Traceback (most recent call last):
  File "/usr/lib/python3.9/subprocess.py", line 73, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/py3compile", line 32, in <module>
    from subprocess import PIPE, Popen
  File "/usr/lib/python3.9/subprocess.py", line 80, in <module>
    import selectors
ModuleNotFoundError: No module named 'selectors'
dpkg: error while cleaning up:
installed python3-dateutil package post-installation script subprocess returned error exit status 1
Preparing to unpack .../python3-pil.imagetk_8.1.2+dfsg-0.3_arm64.deb ...
Traceback (most recent call last):
  File "/usr/lib/python3.9/subprocess.py", line 73, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/py3clean", line 32, in <module>
    from debpython import files as dpf
  File "/usr/share/python3/debpython/__init__.py", line 7, in <module>
    from subprocess import PIPE, Popen
  File "/usr/lib/python3.9/subprocess.py", line 80, in <module>
    import selectors
ModuleNotFoundError: No module named 'selectors'
dpkg: warning: old python3-pil.imagetk:arm64 package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/lib/python3.9/subprocess.py", line 73, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/py3clean", line 32, in <module>
    from debpython import files as dpf
  File "/usr/share/python3/debpython/__init__.py", line 7, in <module>
    from subprocess import PIPE, Popen
  File "/usr/lib/python3.9/subprocess.py", line 80, in <module>
    import selectors
ModuleNotFoundError: No module named 'selectors'
dpkg: error processing archive /var/cache/apt/archives/python3-pil.imagetk_8.1.2+dfsg-0.3_arm64.deb (--unpack):
new python3-pil.imagetk:arm64 package pre-removal script subprocess returned error exit status 1
Traceback (most recent call last):
  File "/usr/lib/python3.9/subprocess.py", line 73, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/py3compile", line 32, in <module>
    from subprocess import PIPE, Popen
  File "/usr/lib/python3.9/subprocess.py", line 80, in <module>
    import selectors
ModuleNotFoundError: No module named 'selectors'
dpkg: error while cleaning up:
installed python3-pil.imagetk:arm64 package post-installation script subprocess returned error exit status 1
Preparing to unpack .../python3-pil_8.1.2+dfsg-0.3_arm64.deb ...
Traceback (most recent call last):
  File "/usr/lib/python3.9/subprocess.py", line 73, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/py3clean", line 32, in <module>
    from debpython import files as dpf
  File "/usr/share/python3/debpython/__init__.py", line 7, in <module>
    from subprocess import PIPE, Popen
  File "/usr/lib/python3.9/subprocess.py", line 80, in <module>
    import selectors
ModuleNotFoundError: No module named 'selectors'
dpkg: warning: old python3-pil:arm64 package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/lib/python3.9/subprocess.py", line 73, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/py3clean", line 32, in <module>
    from debpython import files as dpf
  File "/usr/share/python3/debpython/__init__.py", line 7, in <module>
    from subprocess import PIPE, Popen
  File "/usr/lib/python3.9/subprocess.py", line 80, in <module>
    import selectors
ModuleNotFoundError: No module named 'selectors'
dpkg: error processing archive /var/cache/apt/archives/python3-pil_8.1.2+dfsg-0.3_arm64.deb (--unpack):
new python3-pil:arm64 package pre-removal script subprocess returned error exit status 1
Traceback (most recent call last):
  File "/usr/lib/python3.9/subprocess.py", line 73, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/py3compile", line 32, in <module>
    from subprocess import PIPE, Popen
  File "/usr/lib/python3.9/subprocess.py", line 80, in <module>
    import selectors
ModuleNotFoundError: No module named 'selectors'
dpkg: error while cleaning up:
installed python3-pil:arm64 package post-installation script subprocess returned error exit status 1
Preparing to unpack .../locales-all_2.31-13_arm64.deb ...
Unpacking locales-all (2.31-13) over (2.31-12) ...
dpkg: error processing archive /var/cache/apt/archives/locales-all_2.31-13_arm64.deb (--unpack):
unable to stat './usr/lib/locale/ml_IN/LC_COLLATE' (which was about to be installed): Invalid argument
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/python3-dateutil_2.8.1-6_all.deb
/var/cache/apt/archives/python3-pil.imagetk_8.1.2+dfsg-0.3_arm64.deb
/var/cache/apt/archives/python3-pil_8.1.2+dfsg-0.3_arm64.deb
/var/cache/apt/archives/locales-all_2.31-13_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
  Reply
#2
Obviously there is a problem with missing Python modules ... but you probably figured that out already.

Maybe there is a dependency not listed in those Python packages you're trying to upgrade, so that apt can't correctly calculate the dependencies? I wonder whether using dist-upgrade instead of upgrade would break the log jam, or make things worse.

Try going to a Debian forum and asking your question there, maybe. This really looks like something that's not specific to our Pinephones.

I should have added: if it is a problem with the package, it will probably be corrected fairly quickly. Wait a few days, clear the cache, and try again.
To clean the cache, type:

sudo apt-get clean
Pinephone beta edition, convergence model, Mobian Bookworm with Phosh.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Mobian boot failed with zstd message after upgrade. Mahgue 0 580 09-01-2023, 11:29 AM
Last Post: Mahgue
Wink Pinephone lost graphic during mobian system upgrade cmpin 4 2,057 03-01-2023, 04:45 PM
Last Post: anonymous
  No boot after upgrade: vibration, red LED, then 2 vibrations and yellow LED 3x5co 1 922 01-04-2023, 06:46 PM
Last Post: 3x5co
  Receive MMS fails after Nov 27 upgrade treebeard 17 5,543 12-12-2022, 05:09 AM
Last Post: anonymous
  Dist-upgrade and Chatty vs Gnome-Contacts biketool 9 3,804 09-30-2022, 08:53 PM
Last Post: treebeard
  Modem Firmware Upgrade - Modem Busy - USB Issues biketool 10 4,509 09-23-2022, 05:15 AM
Last Post: biketool
  New Tow-boot release, how to upgrade? user641 3 1,770 08-23-2022, 08:45 AM
Last Post: user641
  GPS/location services don't work with Maps after Bookworm upgrade Anna 16 9,803 06-13-2022, 02:37 PM
Last Post: wibble
  Firmware upgrade via fwupd user641 3 2,714 04-24-2022, 11:01 AM
Last Post: yehudac
  Epiphany browser broken after webkit packages upgrade user641 0 800 04-15-2022, 05:20 AM
Last Post: user641

Forum Jump:


Users browsing this thread: 1 Guest(s)