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
  kernel upgrade user641 2 117 09-13-2021, 08:26 AM
Last Post: user641
  after dist-upgrade, terminal is broken nelstomlinson 9 309 09-09-2021, 06:47 AM
Last Post: nelstomlinson
  No updates after upgrade? jojuma 3 202 08-26-2021, 08:53 PM
Last Post: bcnaz
  When to dist-upgrade vs when to reinstall? DrPlamsa 5 153 08-02-2021, 06:23 PM
Last Post: bcnaz
  Cant update and upgrade mobian. mode80 5 1,166 05-06-2021, 07:32 AM
Last Post: C0ffeeFreak
  No modem after dist-upgrade KJ6OHG 2 664 02-09-2021, 04:29 AM
Last Post: sfb
  Modem scripts replaced by eg25-manager by apt-get dist-upgrade Zebulon Walton 2 1,101 12-21-2020, 06:12 PM
Last Post: Zebulon Walton
  Can't Close Aps After Mobian apt-get dist-upgrade calinb 2 1,231 11-20-2020, 05:42 AM
Last Post: calinb
  Yoyo interefering with apt upgrade Hiraghm 3 1,408 10-11-2020, 11:12 PM
Last Post: ergo owl
  apt dist-upgrade stuck Concrete_panda 3 2,336 08-05-2020, 06:05 AM
Last Post: antiX-Dave

Forum Jump:


Users browsing this thread: 1 Guest(s)