Problem with "sudo apt upgrade"
-
Hi guys! The second day I'm at war with the terminal. At first time I've installed UT on Google Pixel 3a XL comands "apt update", "apt upgrade" and "apt install" works great. I installed MC and it works great. But another day I tryed to update apt and it dpkg finished with error. I tryed to solve this problem and decided to fully reinstall UT (firmware 9 android and than new UT). And...after installing UT "sudo apt upgrade" or "apt install" don't work.
--fix-broken, configure -a also don't working now.
Can somebody help me?
Here is my term after "sudo apt -f install"
phablet@ubuntu-phablet:~$ sudo apt -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following additional packages will be installed: address-book-app lomiri lomiri-keyboard lomiri-system-settings morph-browser usermetricsservice Suggested packages: dbus-property-service Recommended packages: lomiri-greeter-session-broadcast The following packages will be upgraded: address-book-app lomiri lomiri-keyboard lomiri-system-settings morph-browser usermetricsservice 6 upgraded, 0 newly installed, 0 to remove and 5 not upgraded. 169 not fully installed or removed. Need to get 1,227 kB/6,783 kB of archives. After this operation, 39.9 kB of additional disk space will be used. Do you want to continue? [Y/n] y 79% [Working] 912 kB/s 1s79% [Working] 912 kB/s 1s79% [Working] 912 kB/s 1s79% [Working] 912 kB/s 1s79% [Working] 912 kB/s 1s79% [Working] 912 kB/s 1s79% [Working] 912 kB/s 1s79% [Working] 912 kB/s 1s79% [Connecting to repo.ubports.com (104.21.0.97)] 912 kB/s 1sGet:1 http://repo.ubports.com focal/main arm64 content-hub arm64 1.0.2+0~20230222144229.53+ubports20.04~1.gbpc6d06e [81.1 kB] 79% [1 content-hub 0 B/81.1 kB 0%] 912 kB/s 1s82% [Working] 912 kB/s 1sGet:2 http://repo.ubports.com focal/main arm64 dialer-app arm64 1.0.0~20230224123838.40~2597bfb+ubports20.04 [591 kB] 82% [2 dialer-app 0 B/591 kB 0%] 912 kB/s 1s87% [2 dialer-app 434 kB/591 kB 74%] 912 kB/s 0s91% [Working] 912 kB/s 0sGet:3 http://repo.ubports.com focal/main arm64 messaging-app arm64 1.0.0+0~20230224123638.52+ubports20.04~1.gbp90924c [556 kB] 91% [3 messaging-app 0 B/556 kB 0%] 912 kB/s 0s96% [3 messaging-app 363 kB/556 kB 65%] 912 kB/s 0s100% [Working] 912 kB/s 0sFetched 1,227 kB in 12s (103 kB/s) debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) debconf: falling back to frontend: Readline (Reading database ... 57880 files and directories currently installed.) Preparing to unpack .../0-lomiri-system-settings_1.0.1+0~20230302143817.120+ubports20.04~1.gbp732bd4_arm64.deb ... 7[30;0f[42m[30mProgress: [ 0%][49m[39m [..............................................................................................................................................................................................................................] 8Unpacking lomiri-system-settings (1.0.1+0~20230302143817.120+ubports20.04~1.gbp732bd4) over (1.0.1+0~20230224070301.117+ubports20.04~1.gbpe2bcd6) ... [1mdpkg:[0m error processing archive /tmp/apt-dpkg-install-Rt8fbS/0-lomiri-system-settings_1.0.1+0~20230302143817.120+ubports20.04~1.gbp732bd4_arm64.deb (--unpack): unable to create '/usr/share/session-migration/scripts/lomiri-system-settings-greeter-data-rename.sh.dpkg-new' (while processing './usr/share/session-migration/scripts/lomiri-system-settings-greeter-data-rename.sh'): Read-only file system [1mdpkg[0m: [1;31merror while cleaning up:[0m unable to remove newly-extracted version of '/usr/share/session-migration/scripts/lomiri-system-settings-greeter-data-rename.sh': Read-only file system Preparing to unpack .../1-address-book-app_0.8~20230303090943.67~a5120c5+ubports20.04_arm64.deb ... Unpacking address-book-app (0.8~20230303090943.67~a5120c5+ubports20.04) over (0.8~20230224123846.62~c88d92b+ubports20.04) ... [1mdpkg:[0m error processing archive /tmp/apt-dpkg-install-Rt8fbS/1-address-book-app_0.8~20230303090943.67~a5120c5+ubports20.04_arm64.deb (--unpack): unable to clean up mess surrounding './usr/share/session-migration/scripts/address-book-app-name-change.sh' before installing another version: Read-only file system Preparing to unpack .../2-usermetricsservice_1.3.0+0~20230302173705.28+ubports20.04~1.gbpbce6f6_arm64.deb ... 7[30;0f[42m[30mProgress: [ 1%][49m[39m [##............................................................................................................................................................................................................................] 8Unpacking usermetricsservice (1.3.0+0~20230302173705.28+ubports20.04~1.gbpbce6f6) over (1.3.0+0~20230221153751.25+ubports20.04~1.gbp383f76) ... [1mdpkg:[0m error processing archive /tmp/apt-dpkg-install-Rt8fbS/2-usermetricsservice_1.3.0+0~20230302173705.28+ubports20.04~1.gbpbce6f6_arm64.deb (--unpack): unable to create '/usr/share/session-migration/scripts/libusermetrics-rename-gsettings.sh.dpkg-new' (while processing './usr/share/session-migration/scripts/libusermetrics-rename-gsettings.sh'): Read-only file system [1mdpkg[0m: [1;31merror while cleaning up:[0m unable to remove newly-extracted version of '/usr/share/session-migration/scripts/libusermetrics-rename-gsettings.sh': Read-only file system Preparing to unpack .../3-lomiri_0.1.2+0~20230305184850.136+ubports20.04~1.gbp75f9bb_arm64.deb ... Unpacking lomiri (0.1.2+0~20230305184850.136+ubports20.04~1.gbp75f9bb) over (0.1.2+0~20230226172745.133+ubports20.04~1.gbp86b6a2) ... [1mdpkg:[0m error processing archive /tmp/apt-dpkg-install-Rt8fbS/3-lomiri_0.1.2+0~20230305184850.136+ubports20.04~1.gbp75f9bb_arm64.deb (--unpack): unable to create '/usr/share/session-migration/scripts/lomiri-accountsservice-schema-name-change.py.dpkg-new' (while processing './usr/share/session-migration/scripts/lomiri-accountsservice-schema-name-change.py'): Read-only file system [1mdpkg[0m: [1;31merror while cleaning up:[0m unable to remove newly-extracted version of '/usr/share/session-migration/scripts/lomiri-accountsservice-schema-name-change.py': Read-only file system Preparing to unpack .../4-lomiri-keyboard_1.0~20230305150141.30~e395b2b+ubports20.04_arm64.deb ... Unpacking lomiri-keyboard (1.0~20230305150141.30~e395b2b+ubports20.04) over (1.0~20230221153908.27~817c937+ubports20.04) ... [1mdpkg:[0m error processing archive /tmp/apt-dpkg-install-Rt8fbS/4-lomiri-keyboard_1.0~20230305150141.30~e395b2b+ubports20.04_arm64.deb (--unpack): unable to create '/usr/share/session-migration/scripts/lomiri-keyboard-gsettings-schema-name-change.sh.dpkg-new' (while processing './usr/share/session-migration/scripts/lomiri-keyboard-gsettings-schema-name-change.sh'): Read-only file system [1mdpkg[0m: [1;31merror while cleaning up:[0m unable to remove newly-extracted version of '/usr/share/session-migration/scripts/lomiri-keyboard-gsettings-schema-name-change.sh': Read-only file system Preparing to unpack .../5-morph-browser_1.0.2+0~20230304173956.65+ubports20.04~1.gbpd823ce_arm64.deb ... 7[30;0f[42m[30mProgress: [ 2%][49m[39m [####..........................................................................................................................................................................................................................] 8Unpacking morph-browser (1.0.2+0~20230304173956.65+ubports20.04~1.gbpd823ce) over (1.0.1+0~20230223130854.59+ubports20.04~1.gbp06a9dd) ... [1mdpkg:[0m error processing archive /tmp/apt-dpkg-install-Rt8fbS/5-morph-browser_1.0.2+0~20230304173956.65+ubports20.04~1.gbpd823ce_arm64.deb (--unpack): unable to create '/usr/share/session-migration/scripts/morph-browser-name-change.sh.dpkg-new' (while processing './usr/share/session-migration/scripts/morph-browser-name-change.sh'): Read-only file system [1mdpkg[0m: [1;31merror while cleaning up:[0m unable to remove newly-extracted version of '/usr/share/session-migration/scripts/morph-browser-name-change.sh': Read-only file system Errors were encountered while processing: /tmp/apt-dpkg-install-Rt8fbS/0-lomiri-system-settings_1.0.1+0~20230302143817.120+ubports20.04~1.gbp732bd4_arm64.deb /tmp/apt-dpkg-install-Rt8fbS/1-address-book-app_0.8~20230303090943.67~a5120c5+ubports20.04_arm64.deb /tmp/apt-dpkg-install-Rt8fbS/2-usermetricsservice_1.3.0+0~20230302173705.28+ubports20.04~1.gbpbce6f6_arm64.deb /tmp/apt-dpkg-install-Rt8fbS/3-lomiri_0.1.2+0~20230305184850.136+ubports20.04~1.gbp75f9bb_arm64.deb /tmp/apt-dpkg-install-Rt8fbS/4-lomiri-keyboard_1.0~20230305150141.30~e395b2b+ubports20.04_arm64.deb /tmp/apt-dpkg-install-Rt8fbS/5-morph-browser_1.0.2+0~20230304173956.65+ubports20.04~1.gbpd823ce_arm64.deb 7[0;30r8[1A[J[1;33mW: [0mNo sandbox user '_apt' on the system, can not drop privileges[0m [1;31mE: [0mSub-process /usr/bin/dpkg returned an error code (1)[0m phablet@ubuntu-phablet:~$
-
Do you realise that apt is not supported on UT? Updates are done through the GUI in Settings.
-
@moem but it works some day ago! For examle, I made "apt update", "apt upgrade", "install mc" 100%.
-
@moriarty The issue is not if it works or not, the issue is, that it is not supported. Which means, doing this is beyond the intended use of the system. You are still free to do this on your device. It is your device after all, and the software is free to be used as the user sees fit. But it also means that if you run into problems using it in this way, you should not expect any support from the community, in the form of helping you get out of the hole you dug for yourself.
I say this not to be harsh, but to be clear
The supported way of installing apt packages is inside a libertine container. If you are on xenial this should work fairly well, especially with ncurses / terminal / commandline apps.
If you are on focal, it should also work, but some users (including myself) have experienced issues creating containers on focal.
-
@arubislander I see! Thanks for answer and help. I just tryed to know, what happened between this days)))
-
@moriarty said in Problem with "sudo apt upgrade":
@arubislander I see! Thanks for answer and help. I just tryed to know, what happened between this days)))
Ah I see. (I will pull a ChatGPT here): The errors you are encountering is because of the read-only filesystem. You must have made the file system writable previously to install mc, but then promptly forgotten about having done so beforehand.
The root filesystem being read-only is the reason apt is not supported.
-
@arubislander Hi! I remounted file system before apt. I do it everytime. Let me remeber. All apt command worked at first time. After that I have problem always. Reinstall UT, downgrade to 9 android and install clean UT didn't help.
-
@moriarty
Before using apt-update, make sure your device is up to date ( system-settings->update).
apt upgrade work most of the time, but some updates are expected to be installed in recovery only, making the update broken.
In that case, often a re-install from the installer is ok.